name=ClientLib | version=0.1 | accountable=Marcos Roriz | depdency= [[MR-UDP]]
ClientLib
ClientLib provides direct, group and publish-subscribe communication paradigms for mobile nodes (MNs). It extends the MR-UDP with mobility-tolerating features, such as handover and Firewall/NAT transversal. These features are transparent to developers, that is, they do not need to handle them. However, ClientLib offers a series of listeners for developers to known when these issues arrive, e.g., when a node temporarily disconnect from a Gateway.
Usage
A ClientLib implementa a interface public interface NodeConnection
, com os seguintes métodos:
public void connect(SocketAddress endpoint) throws IOException;
estabelece conexão com um Gatewaypublic void disconnect() throws IOException;
desfaz conexão com o Gatewaypublic int getNumberOfReconnectionsMade();
informa o numero de reconexões feitas com o Gateway;public void sendMessage(Message message) throws IOException;
envia uma Applicationmessage
para o Gateway;public void addNodeConnectionListener(NodeConnectionListener lis);
registra um listener para receber mensagens;public void removeNodeConnectionListener(NodeConnectionListener lis);
remove o listener;public void addSddlListener(SddlNetworkListener lis);
registra um listener para receber avisos sobre o status da conexão;public void removeSddlListener(SddlNetworkListener lis);
remove o listener de conectividade;public long getCreationTimestamp();
obtém informações sobre o momento do estabelecimento da conexão;
Application Message
A Application Message é a classe geral para transmitir um byte array ou um objeto serializado incluindo meta-dados. Os 'tags' são para classsificar a mensagem. Os atributos e principais métodos dessa classe são:
public class ApplicationMessage implements Message { private static final long serialVersionUID = 1L; private byte[] content; private List<String> tagList; private UUID senderID; private UUID senderGatewayID; private UUID recipientID; private UUID recipientGatewayID; private String contentClassName; private long gatewayLogicalTime; protected ClientLibProtocol.MSGType msgType; private Serializable contentObject; private PayloadSerialization payloadType;''
Architecture
Descrever a arquitetura do componente. As principais classes e relações que sustentam o componente.
getService()
Returns Service
myMethod()
Returns Service
Implementation Details
Detalhes de implementação, por exemplo, descrevendo as principais rotinas e os seus fluxos de execução, por onde o desenvolvedor deveria olhar para modificar esse componente.
References
Bibtex/PDF entry dos papers sobre esse componente.