|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IChannel
A channel is an abstraction of a 2-way communication link between 2
IFrameworkContext
instances. A channel is connected to another,
single, peer channel in a remote context.
Each channel can subscribe for IContainer
instances held in the peer
channel's context. The subscription is received by the remote peer channel
and handled. The remote peer channel then sends updates that occur to the
subscribed container instances. The local channel receives these updates and
applies them to the corresponding remote container instances in the local
context. When the update is applied to the container, notifications occur so
listeners can react to the changes (via the event distribution framework).
A channel can issue retransmission requests for individual remote containers or all currently subscribed remote containers.
A channel is dependent on an IConnection
.
Channels exchange the following types of messages
The message format between channels in ABNF is:
message = header ":" payload header = ALPHA ; used to identify the message type payload = data / identity data = 1*(OCTET) identity = 1*(ALPHA / DIGIT) 0*("|" (1*(ALPHA / DIGIT))) ; e1|e2|e3
Field Summary | |
---|---|
static String |
DELIMITER
The delimiter for segments in the payload |
static String |
MSG_CONTAINER_DESTROYED
The header for a container destroyed message. |
static String |
MSG_DATA
The header for a data message. |
static String |
MSG_DESTROY_CONNECTION
The destroy connection message. |
static String |
MSG_INVOKE_RPC
The header for an 'invoke RPC' message. |
static String |
MSG_RETRANSMIT
The retransmit message header. |
static String |
MSG_RETRANSMIT_ALL
The retransmit all message header. |
static String |
MSG_SUBSCRIBE
The header for a subscribe message. |
static String |
MSG_SYN
The synchronise message. |
static String |
MSG_SYN_ACK
The synchronise acknowledge message. |
static String |
MSG_UNSUBSCRIBE
The header for a unsubscribe message. |
Method Summary | |
---|---|
IConnection |
getConnection()
Get the channel's connection |
String |
getRemoteContextIdentity()
Get the identity of the remote context this channel connects to |
Methods inherited from interface fulmine.event.subscription.ISubscriptionManager |
---|
addListener, eventSourceCreated, eventSourceDestroyed, getListeners, getSubscribedSources, getSubscribedSources, includes, isSubscribed, removeListener, subscribe, unsubscribe |
Methods inherited from interface fulmine.ILifeCycle |
---|
isActive, start |
Methods inherited from interface fulmine.IDestroyable |
---|
destroy |
Methods inherited from interface fulmine.distribution.IRetransmitter |
---|
requestRetransmit, requestRetransmitAll, retransmit, retransmitAll |
Methods inherited from interface fulmine.rpc.IRpcTransmissionManager |
---|
invokeRpc |
Field Detail |
---|
static final String DELIMITER
static final String MSG_SUBSCRIBE
subscribe-message = header ":" container header = "su" container = type "|" domain "|" identity type = DIGIT domain = DIGIT identity-regex = 1*(ALPHA / DIGIT)
static final String MSG_UNSUBSCRIBE
unsubscribe-message = header ":" container header = "un" container = type "|" domain "|" identity type = DIGIT domain = DIGIT identity-regex = 1*(ALPHA / DIGIT)
static final String MSG_DATA
data-message = header ":" data header = "da" data = 1*(OCTET)
static final String MSG_CONTAINER_DESTROYED
container-destroyed = header ":" container header = "cd" container = type "|" domain "|" identity type = DIGIT domain = DIGIT identity = 1*(ALPHA / DIGIT)
static final String MSG_SYN
MSG_SYN_ACK
. The channels cannot communicate until they are
synchronised. The message structure in ABNF is:
synchronise-message = "syn";
static final String MSG_SYN_ACK
MSG_SYN
and confirms the connection
between two channels - they are synchronised. The message structure in
ABNF is:
synchronise-acknowledge-message = "ack"
static final String MSG_RETRANSMIT
retransmit-message = header ":" container header = "tx" container = type "|" domain "|" identity type = DIGIT domain = DIGIT identity-regex = 1*(ALPHA / DIGIT)
static final String MSG_RETRANSMIT_ALL
retransmit-all-message = "rtx"
static final String MSG_INVOKE_RPC
invoke-rpc = header ":" data header = "ir" data = 1*(ALPHA / DIGIT) ; opaque byte array holding the RPC to invoke
static final String MSG_DESTROY_CONNECTION
destroy-channel-message = "destroyconnection"
Method Detail |
---|
String getRemoteContextIdentity()
IFrameworkContext
IConnection getConnection()
IConnection
used by the channel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |