|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--osl.service.Service
|
+--osl.service.yp.YP
This is a simple YP service which allows local actors to look up the addresses of remote actor managers by specifying an IP or hostname. The manager name returned is always that returned by the YP service running on the remote node. If there is no YP service then the service call will hang.
Service| Field Summary | |
static ServiceName |
name
The name of this service. |
int |
port
The port number used by this service. |
static int |
YP_QUERY
This constant indicates a query YP message. |
static int |
YP_RESPONSE
This constant indicates a response YP message. |
| Fields inherited from class osl.service.Service |
serviceMethods |
| Constructor Summary | |
YP()
The default constructor. |
|
| Method Summary | |
static YPMsg |
deserializeMsg(byte[] src)
A convenient function for deserializing a message. |
void |
handlerException(RequestSession session,
java.lang.Exception except,
RequestID id)
This method is required by RequestClient, but should never actually be called since we only issue RPC requests through our request session. |
static byte[] |
serializeMsg(YPMsg src)
A convenient function for serializing a message. |
void |
serviceInitialize(Scheduler S,
RemoteActorManager M)
Initialize this service instance. |
void |
serviceInitialize(Scheduler S,
RemoteActorManager M,
TransportLayer T,
RequestHandler R,
java.lang.String P)
The REAL initializer for this service. |
ServiceName |
serviceName()
Return the name of this service. |
void |
transportException(TransportInstance target,
TransportMessage msg,
TransportException error)
Called if the transport layer encounters an exception while attempting to send a previously queued message. |
void |
transportReceive(TransportInstance target,
TransportMessage msg)
Called when the transport layer has received a new message on a connection associated with this client. |
ActorManagerName |
ypLookupRemoteManager(java.lang.String toLookup)
Lookup the ActorManagerName of the foundry node running on a particular machine. |
ActorManagerName |
ypMapActorToManager(ActorName key)
Map an ActorName to the ActorManagerName of the actor currently managing the actor (according to the nameservice). |
| Methods inherited from class osl.service.Service |
serviceInvoke,
serviceRegisterMethod |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final ServiceName name
public int port
public static final int YP_QUERY
public static final int YP_RESPONSE
| Constructor Detail |
public YP()
| Method Detail |
public void serviceInitialize(Scheduler S,
RemoteActorManager M)
throws ServiceException
S - A reference to the scheduler which should be
used to schedule nameservice threads.T - A reference to the transport layer which should
be used for interactions between nameservice instances.
public void serviceInitialize(Scheduler S,
RemoteActorManager M,
TransportLayer T,
RequestHandler R,
java.lang.String P)
throws ServiceException
public ServiceName serviceName()
public ActorManagerName ypLookupRemoteManager(java.lang.String toLookup)
throws ServiceException
toLookup - A String giving the host name or
IP of the node to lookup.
public ActorManagerName ypMapActorToManager(ActorName key)
throws ServiceException
key - The ActorName of the actor to look
up.
public static byte[] serializeMsg(YPMsg src)
throws java.io.IOException
public static YPMsg deserializeMsg(byte[] src)
throws java.io.IOException,
java.io.StreamCorruptedException,
java.lang.ClassNotFoundException,
java.io.OptionalDataException
public void transportReceive(TransportInstance target,
TransportMessage msg)
target - The TransportInstance reference
that this message is targeted for. By assumption, the client is
the owner of this instance.msg - The TransportMessage that was received
for this connection.
public void transportException(TransportInstance target,
TransportMessage msg,
TransportException error)
target - The TransportInstance reference
that the original message was sent from. By assumption, the
client is the owner of this instance.msg - The original TransportMessage that was
queued to be sent to the remote host.error - The TransportException which
encapsulates the error encountered during transmission.
public void handlerException(RequestSession session,
java.lang.Exception except,
RequestID id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||