uka.karmi.socket
Class SocketTechnology

java.lang.Object
  extended byuka.karmi.rmi.Technology
      extended byuka.karmi.stream.StreamTechnology
          extended byuka.karmi.socket.SocketTechnology
All Implemented Interfaces:
Constants

public class SocketTechnology
extends StreamTechnology

The socket technology does not support a method counter. It does not implement the true unexport() semantics. This implementation is currently limited to communication with a maximum of 50 hosts.

Author:
Christian Nester, Bernhard Haumacher

Nested Class Summary
(package private)  class SocketTechnology.ServerThread
           
(package private)  class SocketTechnology.SocketThread
           
 
Nested classes inherited from class uka.karmi.stream.StreamTechnology
StreamTechnology.CallBack, StreamTechnology.LocalID
 
Field Summary
private static int BUFFERSIZE
           
private static int count
          A counter for unique server thread naming
(package private)  java.net.InetAddress localHost
          Internet address of the local host.
 
Fields inherited from class uka.karmi.stream.StreamTechnology
CONNECTION_TIMEOUT
 
Fields inherited from class uka.karmi.rmi.Technology
config, dgc, domainId, ep2utid, protocol, utid2ep
 
Fields inherited from interface uka.karmi.rmi.server.Constants
APP_CALL, COLLECTIVE_OPERATION, DGC_ACK, DGC_CALL, DGC_CALL_ASYNC, MID_BARRIER, MID_COLLECTIVE_EXCHANGE, MID_COLLECTIVE_UPDATE, MID_EXCLUSIVE_LOCK, MID_EXCLUSIVE_UPDATE, MID_REQUEST_TICKET, MID_REQUEST_WAIT, MID_RMA, MID_SERVICE_CREATE_REPLICA, MID_SERVICE_GET_STUB, MID_SERVICE_INTERRUPT, MID_SERVICE_MIGRATE, MID_SERVICE_UPDATE_REFERENCES, MID_WAKEUP, SERVICE_CALL, SKELETON_EXTENSION, STUB_EXTENSION
 
Constructor Summary
SocketTechnology()
           
 
Method Summary
 UTID buildUTID(java.lang.String host, int exportId)
           
 StreamClientConnection createConnection(UTID utid, StreamTechnology.CallBack cb)
          Create a new connection to the remote technology referenced by utid.
 void init(ConfigBundle config)
          This method is called after the standard constructor.
 UTID initExportPoint(ExportPoint ep)
          Called when a new export point was created.
 void probeConfig()
           
 
Methods inherited from class uka.karmi.stream.StreamTechnology
collectConnections, getContext
 
Methods inherited from class uka.karmi.rmi.Technology
asyncDgcCall, buildUTID, dgcCall, getContext, getLocalExportPoint, getMonitorFor, getUTID, rmaAcquire, rmaRelease, serviceCreateReplica, serviceCreateReplicaBody, serviceGetStub, serviceInterrupt, serviceMigrate, serviceUpdateReferences, serviceUpdateReferencesBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFERSIZE

private static final int BUFFERSIZE
See Also:
Constant Field Values

localHost

java.net.InetAddress localHost
Internet address of the local host.


count

private static int count
A counter for unique server thread naming

Constructor Detail

SocketTechnology

public SocketTechnology()
                 throws java.io.IOException
Method Detail

init

public void init(ConfigBundle config)
          throws java.lang.Exception
Description copied from class: Technology
This method is called after the standard constructor. Some init properties are standard and some are technology dependent. The values are read from the config file.

Subclasses of Technology which overwrite this method must also call this method ( super.init(config) ).

Overrides:
init in class StreamTechnology
Throws:
java.lang.Exception

probeConfig

public void probeConfig()
Overrides:
probeConfig in class StreamTechnology

initExportPoint

public UTID initExportPoint(ExportPoint ep)
                     throws java.lang.Exception
Called when a new export point was created. A new UTID object for this export point is returned. If the export point is not supported, null is returned.

Specified by:
initExportPoint in class Technology
Parameters:
ep - export point to register
Returns:
new UTID object or null if export to ep is not supported.
Throws:
java.lang.Exception

buildUTID

public UTID buildUTID(java.lang.String host,
                      int exportId)
               throws java.net.UnknownHostException
Specified by:
buildUTID in class Technology
Throws:
java.net.UnknownHostException

createConnection

public StreamClientConnection createConnection(UTID utid,
                                               StreamTechnology.CallBack cb)
                                        throws java.io.IOException
Description copied from class: StreamTechnology
Create a new connection to the remote technology referenced by utid. The returned connection is a specialized subclass of StreamConnection for use with the concrete transport technology.

Specified by:
createConnection in class StreamTechnology
Throws:
java.io.IOException