All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ninja.rmi.NinjaExportData

java.lang.Object
   |
   +----ninja.rmi.NinjaExportData

public class NinjaExportData
extends Object
NinjaExportData contains information used to export a NinjaRemoteObject for remote access. If no NinjaExportData is specified when the NinjaRemoteObject is exported, then the defaults are used.

See Also:
NinjaRemoteObject

Variable Index

 o callbacks
If the user creates a NinjaServerCallbacks object and references it in the NinjaExportData, then the callbacks in that object will be invoked when certain server-side events occur (such as socket creation and deletion).
 o check_objid
If true, then the incoming object ID is checked for each method invocation.
 o comm_type
Set to one of the RMI_COMM_TYPE_* values to specify the type of communication semantics this object should support.
 o ipaddr
The IP address on which this object will listen.
 o port
The TCP port on which to export this object.
 o RMI_COMM_TYPE_MULTICAST_ONEWAY
Specifies a one-way multicast connection.
 o RMI_COMM_TYPE_RELIABLE
The default setting for comm_type: Specifies a reliable connection (uses TCP sockets).
 o RMI_COMM_TYPE_UNRELIABLE_ONEWAY
Specifies an unreliable connection, one-way (no return value is allowed; a RemoteException is thrown if the method returns a value).

Constructor Index

 o NinjaExportData()
The no-arg constructor for NinjaExportData creates a NinjaExportData object with all parameters set to the default.

Variables

 o port
 public int port
The TCP port on which to export this object. This is generally used only for the RMI registry (which needs to have a well-known port number). If zero, then an anonymous port is used.

 o ipaddr
 public InetAddress ipaddr
The IP address on which this object will listen. Only meaningful if comm_type is set to NinjaExportData.RMI_COMM_TYPE_MULTICAST_ONEWAY (viz).

 o check_objid
 public boolean check_objid
If true, then the incoming object ID is checked for each method invocation. If false, then this check is not made. The idea here is that the client-side stub must have a matching object ID to make calls on this remote object. Since the stub is generally obtained through the registry, then the object ID should match. However, if the client has a "stale" stub (say, the server has crashed and restarted since the stub was obtained) then calls on that stub will fail.

Since use of the NinjaRegistryImpl requires generation of stubs "out of thin air", check_objid is set to false for the registry itself. All other objects should set check_objid to true, unless they don't care for some reason.

The default value is true.

 o comm_type
 public int comm_type
Set to one of the RMI_COMM_TYPE_* values to specify the type of communication semantics this object should support. XXX To be done: Allow multiple settings of this field (for now you can have multiple instances of different NinjaRemoteObjects which all reference the same back-end object to share data).

 o RMI_COMM_TYPE_RELIABLE
 public static final int RMI_COMM_TYPE_RELIABLE
The default setting for comm_type: Specifies a reliable connection (uses TCP sockets).

 o RMI_COMM_TYPE_UNRELIABLE_ONEWAY
 public static final int RMI_COMM_TYPE_UNRELIABLE_ONEWAY
Specifies an unreliable connection, one-way (no return value is allowed; a RemoteException is thrown if the method returns a value).

 o RMI_COMM_TYPE_MULTICAST_ONEWAY
 public static final int RMI_COMM_TYPE_MULTICAST_ONEWAY
Specifies a one-way multicast connection. The server must specify NinjaExportData.port and NinjaExportData.ipaddr to define which multicast group it will listen on.

 o callbacks
 public NinjaServerCallbacks callbacks
If the user creates a NinjaServerCallbacks object and references it in the NinjaExportData, then the callbacks in that object will be invoked when certain server-side events occur (such as socket creation and deletion). This can be used to notify the object of server-side events (such as client connect and disconnect).

Constructors

 o NinjaExportData
 public NinjaExportData()
The no-arg constructor for NinjaExportData creates a NinjaExportData object with all parameters set to the default.


All Packages  Class Hierarchy  This Package  Previous  Next  Index