|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A service provider Handle interface extends the org.jumpi.Handle interface with extended information and control functions.
Method Summary | |
void |
addSelector(Selector selector)
Add the Selector to the list of Selectors to which the Handle belongs. |
void |
ensureProperties()
Ensure that there is a Hashtable for implementation specific Properties which will be returned to a Jumpi client application with Handle.getProperties() . |
java.util.Hashtable |
getClientProperties()
Returns the read-only client properties as used in Jumpi.send() or Jumpi.recv() when blocking, otherwise null. |
Controller |
getController()
Get the Controller instance responsible for the Handle. |
int |
getStatus()
Get the internal status code of the Handle. |
void |
removeProperties()
Ensure that there are no implementation specific Properties which will be returned to a Jumpi client application with Handle.getProperties() . |
void |
removeSelector(Selector selector)
Remove the Selector from the list of Selectors to which the Handle belongs. |
void |
setClientProperties(java.util.Hashtable props)
Sets the read-only client properties as used in Jumpi.send() or Jumpi.recv(). |
void |
setController(Controller controller)
Set the Controller instance responsible for the Handle. |
void |
setDestination(Destination dest)
Set the Destination of the Handle. |
void |
setMessage(java.lang.Object message)
Set the message associated with the Handle. |
void |
setSender(Destination sender)
Set the Destination representing the sender of the message for receiving operations. |
void |
setStatus(int status)
Set the internal status of the Handle. |
void |
setStatus(int status,
java.lang.String statusMessage)
Set the status of the Handle and a status message. |
void |
setStatusMessage(java.lang.String statusMessage)
Set the status message of the Handle. |
Methods inherited from interface org.jumpi.Handle |
assertStatusCode, cancel, getDestination, getMessage, getProperties, getSender, getStatusCode, getStatusMessage, isBlocking, isNonBlocking, isRecvHandle, isSendHandle, waitWhileBlocking, waitWhileBlocking |
Method Detail |
public void setStatus(int status)
Selector.handleStatusChanged(org.jumpi.spi.Handle)
method must be called. All
status codes which are not STATUS_SUCCESS, STATUS_FAILURE or
STATUS_CANCELLED are considered blocking and are signified by
STATUS_TRANSIENT with the return of getStatusCode().
status
- the internal status of the Handle.getStatus()
,
Handle.getStatusCode()
,
Selector.handleStatusChanged(org.jumpi.spi.Handle)
public void setStatus(int status, java.lang.String statusMessage)
Selector.handleStatusChanged(org.jumpi.spi.Handle)
method must be called.
status
- the internal status of the Handle.statusMessage
- the internal status message of the Handle.getStatus()
,
setStatus(int)
,
Selector.handleStatusChanged(org.jumpi.spi.Handle)
public int getStatus()
setStatus(int)
public void setStatusMessage(java.lang.String statusMessage)
statusMessage
- the status message.public void setMessage(java.lang.Object message)
message
- the message being sent, or which has been received.Handle.getMessage()
public void setDestination(Destination dest)
dest
- the Destination to send a message to, or receive from.public void setSender(Destination sender)
sender
- the sender of the message.Handle.getSender()
public void ensureProperties()
Handle.getProperties()
. A Jumpi implementation first ensures
that Properties exist and then uses Handle.getProperties()
to get
them, and then modify them. Calling more than once has no effect. This
mechanism allows lazy creation of Properties when needed, avoiding
obligatory creation of empty containers.
removeProperties()
public void removeProperties()
Handle.getProperties()
.
public void setClientProperties(java.util.Hashtable props)
props
- the read-only client properties as used in Jumpi.send() or
Jumpi.recv().getClientProperties()
,
Jumpi.send(org.jumpi.Destination, java.lang.Object, org.jumpi.Selector, java.util.Hashtable)
,
Jumpi.recv(org.jumpi.Destination, org.jumpi.Selector, java.util.Hashtable)
public java.util.Hashtable getClientProperties()
setClientProperties(java.util.Hashtable)
,
Jumpi.send(org.jumpi.Destination, java.lang.Object, org.jumpi.Selector, java.util.Hashtable)
,
Jumpi.recv(org.jumpi.Destination, org.jumpi.Selector, java.util.Hashtable)
public void addSelector(Selector selector)
selector
- the Selector to which this instance belongs.
java.lang.IllegalArgumentException
- if selector is null.Selector.addHandle(org.jumpi.Handle)
public void removeSelector(Selector selector)
selector
- the Selector to which this instance no longer belongs.
java.lang.IllegalArgumentException
- if selector is null.Selector.clear()
,
Selector.removeHandle(org.jumpi.Handle)
public void setController(Controller controller)
controller
- the responsible Controller.Handle.cancel()
,
getController()
public Controller getController()
setController(org.jumpi.spi.component.Controller)
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |