|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jumpi.impl.JumpiImpl
The service provider implementation of the Jumpi component.
| Field Summary | |
static java.lang.String |
VERSION
The release version. |
| Constructor Summary | |
JumpiImpl()
Creates a new Jumpi object. |
|
| Method Summary | |
void |
configure(java.lang.String name,
Properties props)
Configure the JumpiImpl instance. |
Destination |
getDestination(java.lang.String url)
Return a Destination corresponding to the Url through the default Controller. |
Destination |
getDestination(java.lang.String url,
java.util.Hashtable clientProps)
Return a Destination corresponding to the Url providing the implementation with implementation specific properties. |
Destination |
getDestination(java.lang.String controller,
java.lang.String url)
Return a Destination corresponding to the Url, associated with the named Controller. |
Destination |
getDestination(java.lang.String controllerName,
java.lang.String url,
java.util.Hashtable clientProps)
Return a Destination corresponding to the Url, associated with the named Controller, providing the implementation with implementation specific properties. |
Logger |
getLogger()
Get the Logger. |
java.lang.String |
getName()
Get the fully qualified name of the instance. |
Selector |
getSelector()
Get a new, empty Selector. |
SequenceGenerator |
getSequenceGenerator()
Get the SequenceGenerator. |
TaskScheduler |
getTaskScheduler()
Get the TaskScheduler. |
ThreadFactory |
getThreadFactory()
Get the ThreadFactory. |
Timer |
getTimer()
Get the Timer. |
java.lang.String |
getVersion()
Get the version of the Jumpi implementation. |
void |
manage(Component root,
Component parent,
java.lang.String operation,
java.util.Hashtable parameters)
Perform a recursive management operation through the Jumpi component tree, using the parameters provided. |
void |
manage(java.util.Hashtable parameters)
Manage a Jumpi instance. |
Handle |
recv(Destination dest)
Start a receive operation from a Destination. |
Handle |
recv(Destination dest,
java.util.Hashtable clientProps)
Start a receive operation from a Destination. |
Handle |
recv(Destination dest,
Selector sel)
Start a receive operation from a Destination. |
Handle |
recv(Destination dest,
Selector sel,
java.util.Hashtable clientProps)
Start a receive operation from a Destination, providing the implementation with implementation specific information as read-only properties. |
Handle |
send(Destination dest,
java.lang.Object msg)
Send a message to a Destination. |
Handle |
send(Destination dest,
java.lang.Object msg,
java.util.Hashtable clientProps)
Send a message to a Destination. |
Handle |
send(Destination dest,
java.lang.Object msg,
Selector sel)
Send a message to a Destination. |
Handle |
send(Destination dest,
java.lang.Object msg,
Selector sel,
java.util.Hashtable clientProps)
Send a message to a Destination, providing the implementation with implementation specific properties. |
void |
shutdown()
Shutdown a Jumpi instance. |
void |
startup()
Starts a Jumpi instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VERSION
| Constructor Detail |
public JumpiImpl()
| Method Detail |
public ThreadFactory getThreadFactory()
getThreadFactory in interface Jumpipublic Logger getLogger()
getLogger in interface Jumpipublic Timer getTimer()
getTimer in interface Jumpipublic TaskScheduler getTaskScheduler()
getTaskScheduler in interface Jumpipublic SequenceGenerator getSequenceGenerator()
getSequenceGenerator in interface Jumpipublic java.lang.String getName()
getName in interface Configurableconfigure(java.lang.String, org.jumpi.spi.Properties)public java.lang.String getVersion()
getVersion in interface Jumpi
public void configure(java.lang.String name,
Properties props)
throws java.lang.Exception
Configure the JumpiImpl instance.
The following configuration attributes are defined.
threadfactory - instance - optional[default + org.jumpi.impl.threadfactory.ThreadFactoryImpl].
The thread factory's compone's name suffix.
timer - instance - optional[default + org.jumpi.impl.timer.TimerImpl].
The timer's component property name suffix.
logger - instance - optional[default + org.jumpi.impl.logger.SystemLoggerImpl].
The logger's component property name suffix.
taskscheduler - instance - optional[default + org.jumpi.impl.taskscheduler.TaskSchedulerImpl].
The task scheduler's component property name suffix.
sequencegenerator - instance - optional[default + org.jumpi.impl.sequencegenerator.SequenceGeneratorImpl].
The sequence generator's component property name suffix.
defaultcontroller - string - optional or mandatory if more than 1 controller ).
The fully qualified component name of the default controller.
controller - instancelist - mandatory.
The comma separated list of component name suffixes for controllers.
Component name suffixes are appended onto the Jumpi instance's fully qualified instance name. The child component's fully qualified instance name suffixed with '.classname' gives the property which determines which class to load for the instance.
configure in interface Configurablename - the fully qualified instance name.props - the read-only properties to configure the instance with.
java.lang.Exception - when configuration is unsuccessful.
java.lang.IllegalArgumentException - if name or props is null or invalid
parameters.
public void startup()
throws java.lang.Exception
startup in interface Jumpijava.lang.Exception - when any problems occur during startup. Thereafter the
result of any Jumpi operations on the instance are undefined.shutdown()
public void shutdown()
throws java.lang.Exception
shutdown in interface Jumpijava.lang.Exception - when any problems occurs during shutdown. Thereafter
the result of any Jumpi operations on the instance are
undefined.startup()
public void manage(java.util.Hashtable parameters)
throws java.lang.Exception
manage in interface Jumpiparameters - in-out parameters and results container.
java.lang.Exception - when any problems occurs during management.
public void manage(Component root,
Component parent,
java.lang.String operation,
java.util.Hashtable parameters)
throws java.lang.Exception
The following management actions are handled:
Timer, nor threads from ThreadFactory, nor scheduling support from
TaskScheduler.
manage in interface Manageableroot - the Jumpi instance at the root of the component tree.parent - the immediate parent of the component.operation - the operation.parameters - the operation parameters.
java.lang.Exception - if any failure to perform management occurs.
java.lang.IllegalArgumentException - when parameters are missing.public Destination getDestination(java.lang.String url)
Return a Destination corresponding to the Url through the default Controller.
getDestination in interface Jumpiurl - the Url representation of the Destination.
java.lang.IllegalArgumentException - if url is null.getDestination(String,String,Hashtable)
public Destination getDestination(java.lang.String controller,
java.lang.String url)
Return a Destination corresponding to the Url, associated with the named Controller.
getDestination in interface Jumpicontroller - name of the Controller.url - the Url representation of the Destination.
java.lang.IllegalArgumentException - if url is null or controller is null.getDestination(String,String,Hashtable)
public Destination getDestination(java.lang.String url,
java.util.Hashtable clientProps)
Return a Destination corresponding to the Url providing the implementation with implementation specific properties.
getDestination in interface Jumpiurl - the Url representation of the Destination.clientProps - read-only properties for implementation specific use.
java.lang.IllegalArgumentException - if url or clientProps is null.getDestination(String,String,Hashtable)
public Destination getDestination(java.lang.String controllerName,
java.lang.String url,
java.util.Hashtable clientProps)
Return a Destination corresponding to the Url, associated with the named Controller, providing the implementation with implementation specific properties.
getDestination in interface JumpicontrollerName - name of the Controller.url - Url representation of the Destination.clientProps - read-only properties for implementation specific use.
java.lang.IllegalArgumentException - if any controller or url are null.
public Handle send(Destination dest,
java.lang.Object msg)
send in interface Jumpidest - the Destination to which the message is sent.msg - the Message.
send(Destination,Object,Selector, Hashtable)
public Handle send(Destination dest,
java.lang.Object msg,
Selector sel)
send in interface Jumpidest - the Destination to which the message is sent.msg - the Message.sel - the Selector into which the Handle is placed.
send(Destination,Object,Selector,Hashtable)
public Handle send(Destination dest,
java.lang.Object msg,
java.util.Hashtable clientProps)
send in interface Jumpidest - the Destination to which the message is sent.msg - the Message.clientProps - read-only properties for implementation specific use.
send(Destination,Object,Selector,Hashtable)
public Handle send(Destination dest,
java.lang.Object msg,
Selector sel,
java.util.Hashtable clientProps)
Send a message to a Destination, providing the implementation with
implementation specific properties. The send operation may be
asynchronous, in which case the returned Handle can be used to inquire
the current status of the operation. Furthermore the operation can be
cancelled and the caller can wait for the operation to complete with
Handle.waitWhileBlocking(). Whether the operation is
synchronous or asynchronous is implementation dependent. Any erroneous
condition is stated in the status of the returned Handle. No Exceptions
are thrown since with asynchronous sending, error circumstances can
occur after returning, but before send completion.
The getDestination(java.lang.String) is the only means to get the Destination
objects needed for sending.
The type, syntax and semantics of message are implementation dependent. For example, sending an SMS message may prescribe that the message be a java.lang.String with a maximum length of 180 characters. Sending via some other Destination may require a Serializable object. Jumpi does not dictate that messages should be Serializable or infact any restrictions at all. A Jumpi implementation is responsible for transforming the message Object into a format appropriate for the wire protocol.
Message ordering, reliability, quality of service, and performance guarantees are implementation dependent. Whether concurrent sends are possible is implementation dependent, as well as whether send and receive operations may be performed concurrently.
As a convenience, the Handle which is returned is additionally placed into the Selector provided, regardless of the Handle's status.
send in interface Jumpidest - the Destination to which the message is sent.msg - the Message.sel - the Selector into which the Handle is placed.clientProps - read-only properties for implementation specific use.
java.lang.IllegalArgumentException - if dest or msg are null.public Handle recv(Destination dest)
recv in interface Jumpidest - the Destination to receive from.
recv(Destination, Hashtable)
public Handle recv(Destination dest,
Selector sel)
recv in interface Jumpidest - the Destination to receive from.sel - the Selector into which the Handle is placed.
recv(Destination, Selector, Hashtable)
public Handle recv(Destination dest,
java.util.Hashtable clientProps)
recv in interface Jumpidest - the Destination to receive from.clientProps - read-only implementation specific properties used by
the implementation.
recv(Destination, Selector, Hashtable)
public Handle recv(Destination dest,
Selector sel,
java.util.Hashtable clientProps)
Start a receive operation from a Destination, providing the
implementation with implementation specific information as read-only
properties. A received message is made available to the Jumpi client
application through the Handle.getMessage() method.
recv in interface Jumpidest - the Destination to receive from.sel - the Handle into which the Handle is placed.clientProps - read-only implementation specific properties used by
the implementation.
public Selector getSelector()
getSelector in interface Jumpi
|
Jumpi v1.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||