|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--osl.manager.ActorImpl
|
+--osl.service.shell.ShellActorImpl
This class acts as the actor interface for sessions created by the Shell service. In particular, each shell session is associated with its own ShellActorImpl. A session uses the implementation to receive incoming messages as well as submit requests for sending messages or creating actors. Note that instances of ShellActorImpl can not be migrated.
Shell, Serialized Form| Fields inherited from class osl.manager.ActorImpl |
actorClass,
classRef,
context,
extensionMethods,
nextID,
self |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
| Constructor Summary | |
ShellActorImpl()
|
|
| Method Summary | |
protected void |
actorDeliver(ActorMsgRequest msg)
Receive a new message from our manager. |
protected void |
actorInitialize(ActorManager ourMgr,
ActorName you,
ActorCreateRequest req)
This method initializes a new shell actor implementation which will be associated with a particular ShellSession. |
protected void |
actorPostMigrateRebuild(ActorManager ourMgr)
As ShellActorImpl can not migrate, this method should never be called. |
java.lang.Integer |
available()
Return the number of bytes that can be read from the internal input stream without blocking. |
void |
available(ActorName client,
java.lang.String method)
Determine the number of bytes that can be read from the internal input stream without blocking, and send the result to the specified caller. |
void |
close()
Close the internal input stream. |
void |
close(java.io.OutputStream out)
Close the internal output stream. |
void |
flush(java.io.OutputStream out)
Flush the internal output stream. |
protected ActorName |
implCreate(ActorCreateRequest req)
Request a new actor to be created. |
protected void |
implDestroy(java.lang.String reason)
Destroy the shell actor. |
protected java.lang.Object |
implInvokeService(ServiceName name,
java.lang.String meth,
java.lang.Object[] args)
Invoke a service on behalf of the associated shell session. |
protected void |
implMigrate(ActorManagerName loc)
This method should never be invoked and results in an immediate fatal error. |
protected java.lang.Object |
implSend(ActorMsgRequest msg)
Request that a message be sent. |
void |
mark(java.lang.Integer readlimit)
Mark the current position in the internal stream. |
java.lang.Boolean |
markSupported()
Test if the internal input stream supports the mark and reset methods. |
void |
markSupported(ActorName client,
java.lang.String method)
Test if the internal input stream supports the mark and reset methods. |
void |
print(java.io.OutputStream out,
java.lang.String s)
Print a string to the output stream. |
void |
println(java.io.OutputStream out,
java.lang.String s)
Print a string followed by a newline character. |
void |
read(ActorName client,
java.lang.String method,
java.lang.Integer max)
Read an array of bytes from the input stream and send them to a specified actor. |
java.lang.Byte[] |
read(java.lang.Integer max)
Read an array of bytes from the input stream and return them to the caller. |
java.lang.Character[] |
readln()
Read a line of characters from the internal input stream. |
void |
readln(ActorName client,
java.lang.String method)
Read a line of characters from the internal input stream. |
void |
reset()
Reposition the internal stream to the position marked by a previous call to mark. |
void |
run()
The main processing loop for this actor. |
void |
skip(ActorName client,
java.lang.String method,
java.lang.Long n)
Skip over and discard n bytes of data from the input stream. |
java.lang.Long |
skip(java.lang.Long n)
Skip over and discard n bytes of data from the input stream. |
void |
write(java.io.OutputStream out,
java.lang.Byte[] b)
Write the contents of a byte array to the internal output stream. |
void |
write(java.io.OutputStream out,
java.lang.Byte[] b,
java.lang.Integer off,
java.lang.Integer len)
Write a subsequence of a byte array to the output stream. |
void |
write(java.io.OutputStream out,
java.lang.Integer b)
Writes a byte to the internal output stream. |
| Methods inherited from class osl.manager.ActorImpl |
buildAsynchException,
finalize,
formatAsynchException,
implExtension,
mgrActorCreate,
mgrActorFatalError,
mgrActorInvokeService,
mgrActorMigrate,
mgrActorSend,
registerExtension,
removeExtension,
setCreatingThread,
stampRequest |
| Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public ShellActorImpl()
| Method Detail |
protected void actorInitialize(ActorManager ourMgr,
ActorName you,
ActorCreateRequest req)
ourMgr - The ActorManager which should be
used by this actor implementation to invoke actor services.you - The ActorName that should be used as
the name of the new actor.req - The ActorCreateRequest which describes
the new actor to be created.protected void actorDeliver(ActorMsgRequest msg)
msg - The ActorMsgRequest structure to be
delivered. This structure must be maintained by the actor as it
is required if an exception is returned to the manager.protected void actorPostMigrateRebuild(ActorManager ourMgr)
ourMgr - A reference to the new manager of the
implementation after migration has occurred.public void run()
protected java.lang.Object implSend(ActorMsgRequest msg)
throws RemoteCodeException
msg - The ActorMsgRequest describing the
message to send.
protected ActorName implCreate(ActorCreateRequest req)
throws java.lang.SecurityException,
RemoteCodeException
req - The ActorCreateRequest describing the
new actor to create.protected void implMigrate(ActorManagerName loc)
loc - The ActorManagerName of the node to
migrate to.
protected java.lang.Object implInvokeService(ServiceName name,
java.lang.String meth,
java.lang.Object[] args)
throws ServiceNotFoundException,
ServiceException
name - The ServiceName describing the
service to invoke.args - The Object argument to pass to the
service invocation function.protected void implDestroy(java.lang.String reason)
public java.lang.Byte[] read(java.lang.Integer max)
throws java.io.IOException
in - The InputStream to use for the
operation.max - An Integer giving the maximum number
of bytes to read from the stream.
public void read(ActorName client,
java.lang.String method,
java.lang.Integer max)
throws java.io.IOException
public type method(Byte[]);
where type may be any legal return type. Any error
resulting from the sending of the result
(e.g. NoSuchMethodException, RemoteCodeException, etc) is ignored
by the StreamInputActor (but it IS logged to the Actor
log file). Normally, this method is used by actors wishing to
perform asynchronous I/O. in - The InputStream to use for the
operation.client - The ActorName of the actor which
should receive the data.method - The String name of the method in
client which will accept the data.max - An Integer giving the maximum number
of bytes to read from the stream.StreamInputActor.read(Integer)
public java.lang.Long skip(java.lang.Long n)
throws java.io.IOException
in - The InputStream to use for the
operation.n - A Long giving the number of bytes to
be skipped.
public void skip(ActorName client,
java.lang.String method,
java.lang.Long n)
throws java.io.IOException
public type method(Long);
where type may be any legal return type. Any error
resulting from the sending of the result
(e.g. NoSuchMethodException, RemoteCodeException, etc) is ignored
by the StreamInputActor (but it IS logged to the Actor
log file). Normally, this method is used by actors wishing to
perform asynchronous I/O. in - The InputStream to use for the
operation.client - The ActorName of the actor which
should receive the number of bytes skipped.method - The String name of the method in
client which will accept the number of bytes skipped.n - A Long giving the number of bytes to
be skipped.StreamInputActor.skip(Long)
public java.lang.Integer available()
throws java.io.IOException
in - The InputStream to use for the
operation.
public void available(ActorName client,
java.lang.String method)
throws java.io.IOException
public type method(Integer);
where type may be any legal return type. Any error
resulting from the sending of the result
(e.g. NoSuchMethodException, RemoteCodeException, etc) is ignored
by the StreamInputActor (but it IS logged to the Actor
log file). Normally, this method is used by actors wishing to
perform asynchronous I/O. in - The InputStream to use for the
operation.client - The ActorName of the actor which
should receive the number of bytes available.method - The String name of the method in
client which will accept the number of bytes available.StreamInputActor.available()
public void close()
throws java.io.IOException
in - The InputStream to use for the
operation.public void mark(java.lang.Integer readlimit)
in - The InputStream to use for the
operation.readlimit - An Integer indicating the
maximum number of bytes that can be read before the mark position
becomes invalid.
public void reset()
throws java.io.IOException
in - The InputStream to use for the
operation.public java.lang.Boolean markSupported()
in - The InputStream to use for the
operation.
public void markSupported(ActorName client,
java.lang.String method)
public type method(Boolean);
where type may be any legal return type. Any error
resulting from the sending of the result
(e.g. NoSuchMethodException, RemoteCodeException, etc) is ignored
by the StreamInputActor (but it IS logged to the Actor
log file). Normally, this method is used by actors wishing to
perform asynchronous I/O. in - The InputStream to use for the
operation.client - The ActorName of the actor which
should receive the markSupported statusmethod - The String name of the method in
client which will accept the markSupported
status.StreamInputActor.markSupported()
public java.lang.Character[] readln()
throws java.io.IOException
in - The InputStream to use for the
operation.
public void readln(ActorName client,
java.lang.String method)
throws java.io.IOException
public type method(Character);
where type may be any legal return type. Any error
resulting from the sending of the result
(e.g. NoSuchMethodException, RemoteCodeException, etc) is ignored
by the StreamInputActor (but it IS logged to the Actor
log file). Normally, this method is used by actors wishing to
perform asynchronous I/O. in - The InputStream to use for the
operation.client - The ActorName of the actor which
should receive the line of characters.method - The String name of the method in
client which should recieve the line of characters.StreamInputActor.readln()
public void write(java.io.OutputStream out,
java.lang.Integer b)
throws java.io.IOException
out - The OutputStream to perform the
operation on.b - An Integer giving the byte to write.
public void write(java.io.OutputStream out,
java.lang.Byte[] b)
throws java.io.IOException
out - The OutputStream to perform the
operation on.b - A Byte array of data to write to the
output stream.
public void write(java.io.OutputStream out,
java.lang.Byte[] b,
java.lang.Integer off,
java.lang.Integer len)
throws java.io.IOException
out - The OutputStream to perform the
operation on.b - A Byte array of data from which a
subsequence will be written to the output stream.off - An Integer giving the index in the
data to start the write from.len - An Integer giving the total number of
bytes to write.
public void print(java.io.OutputStream out,
java.lang.String s)
throws java.io.IOException
out - The OutputStream to perform the
operation on.s - The String to display.
public void println(java.io.OutputStream out,
java.lang.String s)
throws java.io.IOException
out - The OutputStream to perform the
operation on.s - The String to display.
public void flush(java.io.OutputStream out)
throws java.io.IOException
out - The OutputStream to perform the
operation on.
public void close(java.io.OutputStream out)
throws java.io.IOException
out - The OutputStream to perform the
operation on.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||