Debian Codegraph @

proton-j/src/main/java/org/apache/qpid/proton/engine/Endpoint.java

raw
1 /*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 */
21 package org.apache.qpid.proton.engine;
22
23
24 import org.apache.qpid.proton.amqp.transport.ErrorCondition;
25
26 public interface Endpoint extends Extendable
27 {
28 /**
29 * @return the local endpoint state
30 */
31 public EndpointState getLocalState();
32
33 /**
34 * @return the remote endpoint state (as last communicated)
35 */
36 public EndpointState getRemoteState();
37
38 /**
39 * @return the local endpoint error, or null if there is none
40 */
41 public ErrorCondition getCondition();
42
43 /**
44 * Set the local error condition
45 * @param condition
46 */
47 public void setCondition(ErrorCondition condition);
48
49 /**
50 * @return the remote endpoint error, or null if there is none
51 */
52 public ErrorCondition getRemoteCondition();
53
54 /**
55 * free the endpoint and any associated resources
56 */
57 public void free();
58
59 /**
60 * transition local state to ACTIVE
61 */
62 void open();
63
64 /**
65 * transition local state to CLOSED
66 */
67 void close();
68
69 /**
70 * Sets an arbitrary an application owned object on the end-point. This object
71 * is not used by Proton.
72 */
73 public void setContext(Object o);
74
75 /**
76 * @see #setContext(Object)
77 */
78 public Object getContext();
79
80 }