|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vhosting.netconf.Operation
public abstract class Operation
This class provides the basis for the construction of a specific RPC operation, with its own features, whose operation is conditioned by the capabilities made available to the server.
Nested Class Summary | |
---|---|
class |
Operation.Reply
Represents the specific reply for the operation. |
Field Summary | |
---|---|
protected Rpc |
operation
The RPC operation reference. |
protected Session |
session
The active session reference. |
Constructor Summary | |
---|---|
Operation(Session session)
Constructs an instance of the operation assigning it to an active session. |
Method Summary | |
---|---|
int |
execute(RpcHandler handler)
Allows you to execute the operation, through the use of a RpcHandler. |
void |
execute(RpcHandler handler,
RpcReplySpecificListener listener)
Allows you to execute the operation, through the use of a RpcHandler specifying a listener that will intercept the RPC reply. |
RpcReply |
executeSync(RpcHandler handler)
Allows you to execute the operation, through the use of a RpcHandler and waits until you get a reply. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Rpc operation
Example: public class Get extends Command { public Get(Session session) { super(session); // Assignmet of operation. operation = new Rpc(Session.BASE_1_0, "get"); } ...
protected Session session
Constructor Detail |
---|
public Operation(Session session)
super(session);In each manufacturer as its first statement.
session
- The active session.Method Detail |
---|
public final int execute(RpcHandler handler) throws java.io.IOException
handler
- The RPC handler.
java.io.IOException
- Throws this exception when the connection is no
longer active before and during the exchange of messages.RpcHandler.setRpcReplyListener(RpcReplyListener listener)
public final void execute(RpcHandler handler, RpcReplySpecificListener listener) throws java.io.IOException
handler
- The RPC handler.listener
- The listener that will intercept the RPC reply.
java.io.IOException
- Throws this exception when the connection is no
longer active before and during the exchange of messages.public final RpcReply executeSync(RpcHandler handler) throws java.io.IOException
handler
- The RPC handler.
java.io.IOException
- Throws this exception when the connection is no
longer active before and during the exchange of messages.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |