public class RemoteServiceManagementService
extends jadex.bridge.service.BasicService
implements jadex.bridge.service.types.remote.IRemoteServiceManagementService
Modifier and Type | Class and Description |
---|---|
static class |
RemoteServiceManagementService.TimeoutTimerTask
Timeout timer task for sent messages.
|
static class |
RemoteServiceManagementService.WaitingCallInfo
Waiting call info.
|
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.service.types.address.TransportAddressBook |
addresses
The transport addresses.
|
protected java.util.List<jadex.commons.transformation.binaryserializer.IDecoderHandler> |
binpostprocs
Postprocessors for binary decoding.
|
protected java.util.List<jadex.commons.transformation.traverser.ITraverseProcessor> |
binpreprocs
Preprocessors for binary encoding.
|
protected jadex.bridge.IExternalAccess |
component
The component.
|
protected jadex.bridge.service.types.marshal.IMarshalService |
marshal
The marshal service.
|
protected jadex.bridge.service.types.message.IMessageService |
msgservice
The message service.
|
protected java.lang.String |
platform
The local platform.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
processingcalls
The map of processing calls (callid -> terniable future).
|
protected jadex.xml.reader.AReader |
reader
The rmi xml to object reader.
|
static java.lang.String |
REMOTE_EXCLUDED
Excluded remote methods (for all methods)
Excluded methods throw UnsupportedOperationException.
|
static java.lang.String |
REMOTE_METHODREPLACEMENT
Replacement methods to be executed instead of remote method invocation.
|
static java.lang.String |
REMOTE_SYNCHRONOUS
Synchronous remote methods (for methods with void return value).
|
static java.lang.String |
REMOTE_TIMEOUT
Timeout for remote method invocation.
|
static java.lang.String |
REMOTE_UNCACHED
Uncached remote methods (for methods with no parameters)
Uncached methods will be invoked on every call.
|
protected RemoteReferenceModule |
rrm
The remote reference module.
|
protected jadex.commons.collection.LRU<java.lang.String,java.util.List<java.lang.Runnable>> |
terminationcommands
The map of termination commands without futures (callid -> command).
|
protected java.util.Timer |
timer
The timer.
|
protected java.util.Map<java.lang.String,RemoteServiceManagementService.WaitingCallInfo> |
waitingcalls
The map of waiting calls (callid -> future).
|
protected jadex.xml.writer.AWriter |
writer
The rmi object to xml writer.
|
Constructor and Description |
---|
RemoteServiceManagementService(jadex.bridge.IExternalAccess component,
jadex.bridge.service.types.library.ILibraryService libservice,
jadex.bridge.service.types.marshal.IMarshalService marshal,
jadex.bridge.service.types.message.IMessageService msgservice,
jadex.bridge.service.types.address.TransportAddressBook addresses)
Create a new remote service management service.
|
Modifier and Type | Method and Description |
---|---|
void |
addFutureCommand(java.lang.String callid,
java.lang.Runnable command)
Add a future command.
|
jadex.bridge.service.types.address.TransportAddressBook |
getAddresses()
Get the addresses.
|
protected java.util.List<jadex.commons.transformation.binaryserializer.IDecoderHandler> |
getBinaryReadInfo() |
protected java.util.List<jadex.commons.transformation.traverser.ITraverseProcessor> |
getBinaryWriteInfo() |
java.util.Map<java.lang.Class<?>,java.lang.Object[]> |
getCodecInfo()
Get the rms codec info that needs to be used for encoding/decoding content.
|
jadex.bridge.IExternalAccess |
getComponent()
Get the component.
|
jadex.commons.future.IFuture<jadex.bridge.IExternalAccess> |
getExternalAccessProxy(jadex.bridge.IComponentIdentifier cid)
Get an external access proxy from a remote component.
|
jadex.commons.future.IFuture<jadex.bridge.IExternalAccess> |
getExternalAccessProxy(jadex.bridge.ITransportComponentIdentifier cid)
Get an external access proxy from a remote component.
|
java.lang.Object |
getProcessingCall(java.lang.String callid)
Get a processing call future.
|
RemoteReferenceModule |
getRemoteReferenceModule()
Get the remote reference module.
|
protected static jadex.commons.future.IFuture<jadex.bridge.IResourceIdentifier> |
getResourceIdentifier(jadex.bridge.IExternalAccess provider,
jadex.bridge.IComponentIdentifier sender) |
jadex.bridge.IComponentIdentifier |
getRMSComponentIdentifier()
Get the rms component identifier.
|
<T> jadex.commons.future.IFuture<java.util.Collection<T>> |
getServiceProxies(jadex.bridge.IComponentIdentifier caller,
jadex.bridge.IComponentIdentifier cid,
java.lang.Class<T> service,
java.lang.String scope,
boolean multiple,
jadex.commons.IAsyncFilter<T> filter)
Get all service proxies from a remote component.
|
<T> jadex.commons.future.IFuture<java.util.Collection<T>> |
getServiceProxies(jadex.bridge.IComponentIdentifier caller,
jadex.bridge.IComponentIdentifier cid,
java.lang.Class<T> service,
java.lang.String scope,
jadex.commons.IAsyncFilter<T> filter)
Get all service proxies from a remote component.
|
<T> jadex.commons.future.IFuture<java.util.Collection<T>> |
getServiceProxies(jadex.bridge.IComponentIdentifier caller,
jadex.bridge.ITransportComponentIdentifier cid,
java.lang.Class<T> service,
java.lang.String scope,
boolean multiple,
jadex.commons.IAsyncFilter<T> filter)
Get all service proxies from a remote component.
|
<T> jadex.commons.future.IFuture<T> |
getServiceProxy(jadex.bridge.IComponentIdentifier caller,
jadex.bridge.IComponentIdentifier cid,
java.lang.Class<T> service,
java.lang.String scope,
jadex.commons.IAsyncFilter<T> filter)
Get a service proxy from a remote component.
|
java.util.Timer |
getTimer()
Get the timer.
|
RemoteServiceManagementService.WaitingCallInfo |
getWaitingCall(java.lang.String callid)
Get a waiting call future.
|
protected jadex.commons.Tuple2<jadex.xml.TypeInfoPathManager,jadex.xml.reader.IObjectReaderHandler> |
getXMLReadInfo()
Get the specific xml read info for rms.
|
protected jadex.xml.writer.IObjectWriterHandler |
getXMLWriteInfo() |
void |
putProcessingCall(java.lang.String callid,
java.lang.Object future)
Add a new processing call.
|
void |
putWaitingCall(java.lang.String callid,
jadex.commons.future.Future<java.lang.Object> future,
RemoteServiceManagementService.TimeoutTimerTask tt,
java.lang.Object context)
Add a new waiting call.
|
java.util.List<java.lang.Runnable> |
removeFutureCommands(java.lang.String callid)
Remove a future command.
|
void |
removeProcessingCall(java.lang.String callid)
Remove a processing call.
|
RemoteServiceManagementService.WaitingCallInfo |
removeWaitingCall(java.lang.String callid)
Remove a waiting call.
|
void |
sendMessage(jadex.bridge.IComponentIdentifier receiver,
jadex.bridge.IComponentIdentifier realrec,
java.lang.Object content,
java.lang.String callid,
long to,
jadex.commons.future.Future<java.lang.Object> future,
java.util.Map<java.lang.String,java.lang.Object> nonfunc,
java.lang.Object context)
Send the request message of a remote method invocation.
|
jadex.commons.future.IFuture<java.lang.Void> |
shutdownService()
Called when the service is shut down.
|
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getMethodTimeout, getPropertyMap, getProviderId, getServiceIdentifier, hashCode, initNFProperties, isValid, setComponentAccess, setPropertyMap, startService, toString
public static final java.lang.String REMOTE_EXCLUDED
public static final java.lang.String REMOTE_UNCACHED
public static final java.lang.String REMOTE_SYNCHRONOUS
public static final java.lang.String REMOTE_METHODREPLACEMENT
public static final java.lang.String REMOTE_TIMEOUT
protected jadex.bridge.IExternalAccess component
protected java.util.Map<java.lang.String,RemoteServiceManagementService.WaitingCallInfo> waitingcalls
protected java.util.Map<java.lang.String,java.lang.Object> processingcalls
protected jadex.commons.collection.LRU<java.lang.String,java.util.List<java.lang.Runnable>> terminationcommands
protected RemoteReferenceModule rrm
protected jadex.xml.writer.AWriter writer
protected jadex.xml.reader.AReader reader
protected java.util.List<jadex.commons.transformation.traverser.ITraverseProcessor> binpreprocs
protected java.util.List<jadex.commons.transformation.binaryserializer.IDecoderHandler> binpostprocs
protected java.util.Timer timer
protected jadex.bridge.service.types.marshal.IMarshalService marshal
protected jadex.bridge.service.types.message.IMessageService msgservice
protected jadex.bridge.service.types.address.TransportAddressBook addresses
protected java.lang.String platform
public RemoteServiceManagementService(jadex.bridge.IExternalAccess component, jadex.bridge.service.types.library.ILibraryService libservice, jadex.bridge.service.types.marshal.IMarshalService marshal, jadex.bridge.service.types.message.IMessageService msgservice, jadex.bridge.service.types.address.TransportAddressBook addresses)
public java.util.Map<java.lang.Class<?>,java.lang.Object[]> getCodecInfo()
public <T> jadex.commons.future.IFuture<T> getServiceProxy(jadex.bridge.IComponentIdentifier caller, jadex.bridge.IComponentIdentifier cid, java.lang.Class<T> service, java.lang.String scope, jadex.commons.IAsyncFilter<T> filter)
getServiceProxy
in interface jadex.bridge.service.types.remote.IRemoteServiceManagementService
caller
- The component that started the search.cid
- The remote provider id.service
- The service type.scope
- The search scope.public <T> jadex.commons.future.IFuture<java.util.Collection<T>> getServiceProxies(jadex.bridge.IComponentIdentifier caller, jadex.bridge.IComponentIdentifier cid, java.lang.Class<T> service, java.lang.String scope, jadex.commons.IAsyncFilter<T> filter)
getServiceProxies
in interface jadex.bridge.service.types.remote.IRemoteServiceManagementService
caller
- The component that started the search.cid
- The remote provider id.service
- The service type.scope
- The search scope.public <T> jadex.commons.future.IFuture<java.util.Collection<T>> getServiceProxies(jadex.bridge.IComponentIdentifier caller, jadex.bridge.IComponentIdentifier cid, java.lang.Class<T> service, java.lang.String scope, boolean multiple, jadex.commons.IAsyncFilter<T> filter)
caller
- The component that started the search.cid
- The remote provider id.service
- The service type.scope
- The search scope.public <T> jadex.commons.future.IFuture<java.util.Collection<T>> getServiceProxies(jadex.bridge.IComponentIdentifier caller, jadex.bridge.ITransportComponentIdentifier cid, java.lang.Class<T> service, java.lang.String scope, boolean multiple, jadex.commons.IAsyncFilter<T> filter)
caller
- The component that started the search.cid
- The remote provider id.service
- The service type.scope
- The search scope.public jadex.commons.future.IFuture<jadex.bridge.IExternalAccess> getExternalAccessProxy(jadex.bridge.IComponentIdentifier cid)
getExternalAccessProxy
in interface jadex.bridge.service.types.remote.IRemoteServiceManagementService
cid
- Component target id.public jadex.commons.future.IFuture<jadex.bridge.IExternalAccess> getExternalAccessProxy(jadex.bridge.ITransportComponentIdentifier cid)
cid
- Component target id.public jadex.bridge.IExternalAccess getComponent()
public jadex.bridge.IComponentIdentifier getRMSComponentIdentifier()
public void putWaitingCall(java.lang.String callid, jadex.commons.future.Future<java.lang.Object> future, RemoteServiceManagementService.TimeoutTimerTask tt, java.lang.Object context)
callid
- The callid.future
- The future.public RemoteServiceManagementService.WaitingCallInfo getWaitingCall(java.lang.String callid)
callid
- The callid.public RemoteServiceManagementService.WaitingCallInfo removeWaitingCall(java.lang.String callid)
callid
- The callid.public void putProcessingCall(java.lang.String callid, java.lang.Object future)
callid
- The callid.future
- The future.public java.lang.Object getProcessingCall(java.lang.String callid)
callid
- The callid.public void removeProcessingCall(java.lang.String callid)
callid
- The callid.public void addFutureCommand(java.lang.String callid, java.lang.Runnable command)
public java.util.List<java.lang.Runnable> removeFutureCommands(java.lang.String callid)
public RemoteReferenceModule getRemoteReferenceModule()
public java.util.Timer getTimer()
public void sendMessage(jadex.bridge.IComponentIdentifier receiver, jadex.bridge.IComponentIdentifier realrec, java.lang.Object content, java.lang.String callid, long to, jadex.commons.future.Future<java.lang.Object> future, java.util.Map<java.lang.String,java.lang.Object> nonfunc, java.lang.Object context)
public jadex.commons.future.IFuture<java.lang.Void> shutdownService()
shutdownService
in interface jadex.bridge.service.IInternalService
shutdownService
in class jadex.bridge.service.BasicService
protected jadex.commons.Tuple2<jadex.xml.TypeInfoPathManager,jadex.xml.reader.IObjectReaderHandler> getXMLReadInfo()
protected jadex.xml.writer.IObjectWriterHandler getXMLWriteInfo()
protected java.util.List<jadex.commons.transformation.binaryserializer.IDecoderHandler> getBinaryReadInfo()
protected java.util.List<jadex.commons.transformation.traverser.ITraverseProcessor> getBinaryWriteInfo()
protected static jadex.commons.future.IFuture<jadex.bridge.IResourceIdentifier> getResourceIdentifier(jadex.bridge.IExternalAccess provider, jadex.bridge.IComponentIdentifier sender)
public jadex.bridge.service.types.address.TransportAddressBook getAddresses()