twcsckernel.projectbase.rmi.socketfactory
Class TwoWay

java.lang.Object
  extended by twcsckernel.projectbase.rmi.socketfactory.TwoWay

public class TwoWay
extends java.lang.Object

Constants and utilities for the two-way signalling protocol.

Author:
Tim Taylor -- tttaylor@cssassociates.com

Field Summary
static int MAX_MESSAGE_LENGTH
          Maximum length of messages in the protocol.
static int PROTOCOL_MAGIC
          Header for all messages in the protocol
static int REGISTER_CALLBACK_SOCKET_SOURCE
          Sent by client to register the signalling channel socket with the server.
static int REQUEST_CALLBACK_SOCKET
          Sent by the server to the client to request that the client make a callback socket for the server's use.
static int RETURN_CALLBACK_SOCKET
          Sent by the client to tell the server that the socket is a callback socket for the server's use in calling client callbacks.
static int RETURN_SERVER_ENDPOINT_INFO
          Sent by the server to the client to inform the client of the server address.
 
Constructor Summary
TwoWay()
           
 
Method Summary
static java.lang.String getAddressString(byte[] address)
          Utility method to convert an IP address to a string.
static java.lang.String getOpcodeName(int opcode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_MAGIC

public static final int PROTOCOL_MAGIC
Header for all messages in the protocol

See Also:
Constant Field Values

REGISTER_CALLBACK_SOCKET_SOURCE

public static final int REGISTER_CALLBACK_SOCKET_SOURCE
Sent by client to register the signalling channel socket with the server.

See Also:
Constant Field Values

RETURN_CALLBACK_SOCKET

public static final int RETURN_CALLBACK_SOCKET
Sent by the client to tell the server that the socket is a callback socket for the server's use in calling client callbacks.

See Also:
Constant Field Values

REQUEST_CALLBACK_SOCKET

public static final int REQUEST_CALLBACK_SOCKET
Sent by the server to the client to request that the client make a callback socket for the server's use.

See Also:
Constant Field Values

RETURN_SERVER_ENDPOINT_INFO

public static final int RETURN_SERVER_ENDPOINT_INFO
Sent by the server to the client to inform the client of the server address. This is the actually address from the server's viewpoint and will be different from the address used to connect to the server if forwarding through a firewall.

See Also:
Constant Field Values

MAX_MESSAGE_LENGTH

public static final int MAX_MESSAGE_LENGTH
Maximum length of messages in the protocol.

See Also:
Constant Field Values
Constructor Detail

TwoWay

public TwoWay()
Method Detail

getAddressString

public static java.lang.String getAddressString(byte[] address)
Utility method to convert an IP address to a string.

Parameters:
address - The four bytes of an IP address.
Returns:
The corresponding string (a.b.c.d format).

getOpcodeName

public static java.lang.String getOpcodeName(int opcode)


Copyright © 2005-2006 CS@PUT. All Rights Reserved.