net.ponder2.comms
Interface Transmitter

All Known Implementing Classes:
TransmitterImpl

public interface Transmitter

Describes the methods that all Ponder2 comms protocols for inter-SMC communication must supply

Version:
$Id:$
Author:
Kevin Twidle

Method Summary
 Transmitter connect(java.net.URI address)
          creates and connects a Transmitter to a remote location.
 P2Object execute(java.net.URI address, OID target, P2Object source, java.lang.String op, P2Object[] args)
          executes commands at a remote managed object.
 P2Object getObject(java.net.URI address, java.lang.String path)
          gets a managed object from a remote SMC
 boolean ping(java.net.URI address)
          Checks to see if the remote service is up and running.
 

Method Detail

connect

Transmitter connect(java.net.URI address)
                    throws Ponder2RemoteException
creates and connects a Transmitter to a remote location. This is called once every time a new remote address is brought into play. If the location is important to the Transmitter i.e. a permanent channel is opened then a new instance of transmitter should be created. If the remote location does not matter then only one instance of the Transmitter need be created and this method can return itself.

Parameters:
address - the location that this protocol is to be connected to
Returns:
a new communications protocol connected to the appropriate place or throw an error if it fails
Throws:
Ponder2RemoteException

ping

boolean ping(java.net.URI address)
Checks to see if the remote service is up and running. Returns true or false.

Parameters:
address - the address of the remote service
Returns:
true if the service is running

getObject

P2Object getObject(java.net.URI address,
                   java.lang.String path)
                   throws Ponder2Exception
gets a managed object from a remote SMC

Parameters:
address - the address of the remote SMC
path - the full path name of the remote managed object
Returns:
the result of the operation.
Throws:
Ponder2Exception - if an exception occurs in the remote system

execute

P2Object execute(java.net.URI address,
                 OID target,
                 P2Object source,
                 java.lang.String op,
                 P2Object[] args)
                 throws Ponder2Exception
executes commands at a remote managed object. The command will either be a create or use clause.

Parameters:
address - the address of the remote SMC
target - the remote object's OID
source - the originator of the operation
op - the operation to be performed
args - the arguments for the operation
Returns:
the result of the operation as a Ponder2 object
Throws:
Ponder2Exception - if an exception occurs in the remote system


Copyright © 2008 Imperial College. All Rights Reserved.