|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.almendra.janet.cas.agents.AbstractAgentProxy
org.almendra.janet.cas.agents.AgentProxy
public class AgentProxy
Field Summary | |
---|---|
protected IAgentDispatcher |
agentDispatcher
|
protected AgentPath |
agentPath
|
protected AbstractApplication |
application
|
static java.lang.String |
LOG_EVENT_NO_ALTERNATIVE_AGENT_FOR_WORKLOAD_SHARING
|
static java.lang.String |
LOG_EVENT_NO_OBSERVER_ON_SAME_WORKSTATION
|
static java.lang.String |
LOG_EVENT_NO_WORKLOAD_BALANCING_POSSIBLE
|
static java.lang.String |
LOG_EVENT_NO_WORLOAD_SHARING_AVAILABLE
|
static java.lang.String |
LOG_EVENT_SENT_COMMAND
|
Fields inherited from class org.almendra.janet.cas.agents.AbstractAgentProxy |
---|
logger, originNodeName |
Constructor Summary | |
---|---|
|
AgentProxy(AbstractApplication application,
IAgentDispatcher agentDispatcher,
AgentPath agentPath,
Logger logger)
Creates a new AgentProxy object. |
protected |
AgentProxy(Logger logger)
Creates a new AgentProxy object. |
Method Summary | |
---|---|
void |
accept(CommandEnvelope env)
|
void |
accept(ICommand command)
|
void |
accept(ICommand command,
Acknowledge ack)
|
void |
accept(ICommand command,
FutureResult futureResult)
Send commmand to an agent expecting a result to be sent
back. |
void |
accept(ICommand command,
IHistorizableCallbackHandler handler)
|
void |
accept(ICommand command,
int kind)
|
void |
accept(IWorkLoadBalancingCommand command)
|
void |
accept(IWorkLoadBalancingCommand command,
Acknowledge ack)
|
void |
accept(IWorkLoadBalancingCommand command,
FutureResult futureResult)
Send commmand to an agent expecting a result to be sent back. |
void |
accept(IWorkLoadBalancingCommand command,
IHistorizableCallbackHandler handler)
|
void |
accept(IWorkLoadSharingCommand sharingCommand)
|
void |
accept(IWorkLoadSharingCommand command,
Acknowledge ack)
|
void |
accept(IWorkLoadSharingCommand command,
FutureResult futureResult)
Send commmand to an agent expecting a result to be sent back. |
void |
accept(IWorkLoadSharingCommand command,
IHistorizableCallbackHandler handler)
|
protected boolean |
existsAlternativeAgents()
|
protected java.util.Set |
getAgentsNodeNamesWithCapability(java.lang.String capabilityName)
|
java.lang.String |
getCapabilityPath()
|
protected CommandAckEnvelope |
getCommandAckEnvelope(AgentPath sourceDestinationAgentPath,
java.lang.String originNodeName,
ICommand command,
java.lang.String futureId)
|
protected CommandCallbackEnvelope |
getCommandCallbackHandlerEnvelope(AgentPath sourceDestinationAgentPath,
java.lang.String originNodeName,
ICommand command,
java.lang.String futureId)
|
protected CommandEnvelope |
getCommandEnvelope(AgentPath sourceDestinationAgentPath,
java.lang.String originNodeName,
ICommand command)
|
protected CommandReplyEnvelope |
getCommandReplyEnvelope(AgentPath sourceDestinationAgentPath,
java.lang.String originNodeName,
ICommand command,
java.lang.String futureId)
|
protected IAgentProxy |
getLoadSharingAgent()
|
LocalCapabilityPath |
getLocalCapabilityPath()
|
protected IObjectSpace |
getNodeObjectSpace()
|
protected int |
getNumberOfAgentsWithCapability()
|
boolean |
isIdle()
|
boolean |
isLocal()
|
protected void |
logNoAlternativeForWorkloadSharingCommand(IWorkLoadSharingCommand sharingCommand)
|
protected void |
logNoLoadBalancingAvailable(IWorkLoadBalancingCommand command)
|
protected void |
logNoLoadSharingAvailable(IWorkLoadCommand command)
|
protected void |
logNoObserverOnSameWorkstation(IWorkLoadSharingCommand sharingCommand)
|
protected void |
logSentCommand(CommandEnvelope commandEnvelope)
|
static void |
LogSentCommand(CommandEnvelope commandEnvelope,
Logger logger)
|
java.util.List |
registeredLogEvents()
Return list of events that may occur for an object. |
protected AgentPath |
replyPathSameAgent()
|
protected void |
sendNoWorkLoadCommand(IWorkLoadBalancingCommand balancingCommand)
|
protected void |
sendNoWorkLoadCommand(IWorkLoadSharingCommand sharingCommand)
|
void |
setLogger(Logger logger)
|
protected void |
setReplyAgentPath(Acknowledge ack,
CommandAckEnvelope env)
|
int |
size()
|
Methods inherited from class org.almendra.janet.cas.agents.AbstractAgentProxy |
---|
checkValidity, getLogger, getOriginNodeName, setOriginNodeName |
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 LOG_EVENT_SENT_COMMAND
public static final java.lang.String LOG_EVENT_NO_ALTERNATIVE_AGENT_FOR_WORKLOAD_SHARING
public static final java.lang.String LOG_EVENT_NO_WORKLOAD_BALANCING_POSSIBLE
public static final java.lang.String LOG_EVENT_NO_WORLOAD_SHARING_AVAILABLE
public static final java.lang.String LOG_EVENT_NO_OBSERVER_ON_SAME_WORKSTATION
protected AbstractApplication application
protected AgentPath agentPath
protected IAgentDispatcher agentDispatcher
Constructor Detail |
---|
protected AgentProxy(Logger logger)
AgentProxy
object.
public AgentProxy(AbstractApplication application, IAgentDispatcher agentDispatcher, AgentPath agentPath, Logger logger)
AgentProxy
object.
Method Detail |
---|
public void accept(ICommand command) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
accept
in class AbstractAgentProxy
java.rmi.RemoteException
InvalidCommandException
public void accept(ICommand command, int kind) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
protected void logSentCommand(CommandEnvelope commandEnvelope)
command
- public static void LogSentCommand(CommandEnvelope commandEnvelope, Logger logger)
public void accept(ICommand command, FutureResult futureResult) throws java.lang.IllegalArgumentException, java.rmi.RemoteException, InvalidCommandException
commmand
to an agent expecting a result to be sent
back.
accept
in interface IAgentProxy
accept
in class AbstractAgentProxy
command
- to be sent to another agentreplyToAgentPath
- path to agent that should receive result
java.lang.IllegalArgumentException
java.rmi.RemoteException
InvalidCommandException
protected void setReplyAgentPath(Acknowledge ack, CommandAckEnvelope env) throws java.lang.IllegalArgumentException
ack
- env
-
java.lang.IllegalArgumentException
protected CommandAckEnvelope getCommandAckEnvelope(AgentPath sourceDestinationAgentPath, java.lang.String originNodeName, ICommand command, java.lang.String futureId)
sourceDestinationAgentPath
- originNodeName
- command
-
protected CommandEnvelope getCommandEnvelope(AgentPath sourceDestinationAgentPath, java.lang.String originNodeName, ICommand command)
protected CommandReplyEnvelope getCommandReplyEnvelope(AgentPath sourceDestinationAgentPath, java.lang.String originNodeName, ICommand command, java.lang.String futureId)
protected CommandCallbackEnvelope getCommandCallbackHandlerEnvelope(AgentPath sourceDestinationAgentPath, java.lang.String originNodeName, ICommand command, java.lang.String futureId)
public void accept(ICommand command, IHistorizableCallbackHandler handler) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
accept
in class AbstractAgentProxy
command
- handler
-
java.rmi.RemoteException
InvalidCommandException
protected AgentPath replyPathSameAgent()
replyPathSameAgent
in class AbstractAgentProxy
public java.util.List registeredLogEvents()
ILoggable
registeredLogEvents
in interface ILoggable
public void setLogger(Logger logger)
setLogger
in class AbstractAgentProxy
logger
- The logger to set.public void accept(CommandEnvelope env) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
public int size()
size
in interface IAgentProxy
public LocalCapabilityPath getLocalCapabilityPath()
public java.lang.String getCapabilityPath()
public void accept(IWorkLoadSharingCommand sharingCommand) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
protected void logNoObserverOnSameWorkstation(IWorkLoadSharingCommand sharingCommand)
sharingCommand
- protected void logNoLoadSharingAvailable(IWorkLoadCommand command)
sharingCommand
- protected void logNoAlternativeForWorkloadSharingCommand(IWorkLoadSharingCommand sharingCommand)
sharingCommand
- protected IAgentProxy getLoadSharingAgent()
protected void sendNoWorkLoadCommand(IWorkLoadSharingCommand sharingCommand) throws java.rmi.RemoteException, InvalidCommandException
sharingCommand
-
java.rmi.RemoteException
InvalidCommandException
protected void sendNoWorkLoadCommand(IWorkLoadBalancingCommand balancingCommand) throws java.rmi.RemoteException, InvalidCommandException
sharingCommand
-
java.rmi.RemoteException
InvalidCommandException
protected boolean existsAlternativeAgents()
protected int getNumberOfAgentsWithCapability()
protected java.util.Set getAgentsNodeNamesWithCapability(java.lang.String capabilityName)
public boolean isIdle()
public void accept(IWorkLoadBalancingCommand command) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
protected void logNoLoadBalancingAvailable(IWorkLoadBalancingCommand command)
command
- public boolean isLocal()
protected IObjectSpace getNodeObjectSpace()
public void accept(ICommand command, Acknowledge ack) throws java.rmi.RemoteException, InvalidCommandException, java.lang.IllegalArgumentException
accept
in interface IAgentProxy
accept
in class AbstractAgentProxy
java.rmi.RemoteException
InvalidCommandException
java.lang.IllegalArgumentException
public void accept(IWorkLoadSharingCommand command, Acknowledge ack) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
public void accept(IWorkLoadSharingCommand command, FutureResult futureResult) throws java.lang.IllegalArgumentException, java.rmi.RemoteException, InvalidCommandException
IAgentProxy
commmand
to an agent expecting a result to be sent back.
accept
in interface IAgentProxy
command
- to be sent to another agent
java.lang.IllegalArgumentException
java.rmi.RemoteException
InvalidCommandException
public void accept(IWorkLoadBalancingCommand command, IHistorizableCallbackHandler handler) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
public void accept(IWorkLoadBalancingCommand command, Acknowledge ack) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
public void accept(IWorkLoadBalancingCommand command, FutureResult futureResult) throws java.lang.IllegalArgumentException, java.rmi.RemoteException, InvalidCommandException
IAgentProxy
commmand
to an agent expecting a result to be sent back.
accept
in interface IAgentProxy
command
- to be sent to another agent
java.lang.IllegalArgumentException
java.rmi.RemoteException
InvalidCommandException
public void accept(IWorkLoadSharingCommand command, IHistorizableCallbackHandler handler) throws java.rmi.RemoteException, InvalidCommandException
accept
in interface IAgentProxy
java.rmi.RemoteException
InvalidCommandException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |