public final class TPFactory
extends java.lang.Object
Title: TPFactory (Tucson Protocol Factory)
Description: the factory class to build a specific implementation of TucsonProtocol
Modifier and Type | Field and Description |
---|---|
static int |
DIALOG_TYPE_TCP
Constant indentify implementated protocol type: one constant for each
implemented protocol
|
Modifier and Type | Method and Description |
---|---|
static AbstractTucsonProtocol |
getDialogAgentSide(int tucsonProtocolType,
TucsonTupleCentreId tid) |
static AbstractTucsonProtocol |
getDialogAgentSide(TucsonTupleCentreId tid) |
static AbstractTucsonProtocol |
getDialogNodeSide(int tucsonProtocolType,
int portno)
Instantiate a new TucsonProtocol based on type specified by parameter.
|
public static final int DIALOG_TYPE_TCP
public static AbstractTucsonProtocol getDialogAgentSide(int tucsonProtocolType, TucsonTupleCentreId tid) throws DialogInitializationException, UnreachableNodeException, InvalidProtocolTypeException
tucsonProtocolType
- the type code of the TuCSoN protocol to be usedtid
- the identifier of the tuple centre to connect toDialogInitializationException
- if something goes wrong in the underlying networkUnreachableNodeException
- if the target tuple centre is unreachableInvalidProtocolTypeException
- if the protocol type used is not DIALOG_TYPE_TCPpublic static AbstractTucsonProtocol getDialogAgentSide(TucsonTupleCentreId tid) throws UnreachableNodeException, DialogInitializationException
tid
- the identifier of the tuple centre to connect toDialogInitializationException
- if something goes wrong in the underlying networkUnreachableNodeException
- if the target tuple centre is unreachablepublic static AbstractTucsonProtocol getDialogNodeSide(int tucsonProtocolType, int portno) throws InvalidProtocolTypeException, DialogInitializationException
tucsonProtocolType
- the type code of the TuCSoN protocol to be usedportno
- the port where the TuCSoN node to contact is listening toDialogInitializationException
- if something goes wrong in the underlying networkInvalidProtocolTypeException
- if the protocol type used is not DIALOG_TYPE_TCP