|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dvb.net.rc.RCInterface
org.dvb.net.rc.ConnectionRCInterface
public class ConnectionRCInterface
This class models a connection based return channel network interface for use in receiving and transmitting IP packets over a return channel. Targets for connections are specified as strings including the number to dial. These strings can only include either numbers or a "+" character (as the first character only).
When a ConnectionRCInterface
instance is first obtained by an application, the
current target shall be set to the default. Applications which wish to use a non-default target
need to set this target before attempting to reserve the ConnectionRCInterface
.
This is because if the application does not have the permission to use the default target,
the reserve()
method is required throw a SecurityException
.
Field Summary |
---|
Fields inherited from class org.dvb.net.rc.RCInterface |
---|
TYPE_CATV, TYPE_DECT, TYPE_ISDN, TYPE_LMDS, TYPE_MATV, TYPE_OTHER, TYPE_PSTN, TYPE_RCS, TYPE_UNKNOWN |
Method Summary | |
---|---|
void |
addConnectionListener(ConnectionListener l)
Add a listener for events related to connections of this interface. |
void |
connect()
Connect this return channel to the current target. |
void |
disconnect()
Disconnect this return channel from the current target. |
ResourceClient |
getClient()
Return the object which asked to be notified about withdrawal of the underlying resource. |
int |
getConnectedTime()
Return the time an interface has been connected |
ConnectionParameters |
getCurrentTarget()
Get the current target for connections. |
float |
getSetupTimeEstimate()
Obtain an estimate of the setup time for a successful connection for this interface in seconds. |
boolean |
isConnected()
Check if this interface is connected. |
void |
release()
Release the right to control this return channel interface. |
void |
removeConnectionListener(ConnectionListener l)
Remove a listener for events related to connections of this interface. |
void |
reserve(ResourceClient c,
java.lang.Object requestData)
Request the right to control this return channel interface. |
void |
setTarget(ConnectionParameters target)
Set a non-default target for connections. |
void |
setTargetToDefault()
Set the target for connections to the default. |
Methods inherited from class org.dvb.net.rc.RCInterface |
---|
getDataRate, getType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isConnected()
public float getSetupTimeEstimate()
public void reserve(ResourceClient c, java.lang.Object requestData) throws PermissionDeniedException
The details of the current connection target shall be obtained from the
ConnectionParameters
instance which is the current target
during the call to this method. Hence changes to that ConnectionParameters
instance before a call to this method shall be taken account of during the
method call. Changes after the call to this method shall have no effect on that connection.
c
- the object to be notified when resources are removedrequestData
- Used by the Resource Notification API in the
requestRelease method of the ResourceClient interface.
The usage of this parameter is optional and a null reference
may be supplied.
PermissionDeniedException
- if this interface cannot be reserved
java.lang.SecurityException
- if the application is
denied access to the resource by security policy.public void release()
public void connect() throws java.io.IOException, PermissionDeniedException
PermissionDeniedException
- if this application does not own the resource
java.io.IOException
- if connection is known to be impossible at the time
when the method is calledpublic void disconnect() throws PermissionDeniedException
PermissionDeniedException
- if this application does not own the resourcepublic ConnectionParameters getCurrentTarget() throws IncompleteTargetException
If this ConnectionRCInterface is connected then this method shall return the target to which the connection was made. If this ConnectionRCInterface is not connected then this method shall return the last target set by the setTarget method (if any) otherwise the default.
This returns either the default target or the last target set by this application calling the setTarget method on this instance before the connection was established. This applies regardless of whether the connection was established by another GEM application or if some of the connection parameters have been supplied by the server.
IncompleteTargetException
- if the current target is not completely configured
java.lang.SecurityException
- if the application is not allowed to read the current target
as defined by the security policy of the platformpublic void setTarget(ConnectionParameters target) throws IncompleteTargetException, PermissionDeniedException
If this method is called for a ConnectionRCInterface which is connected then successful calls to this method shall not interrupt that connection. The newly set target shall just be stored until either the next time a connection is established with that ConnectionRCInterface instance or until a subsequent call to setTarget on that ConnectionRCInterface.
The details of the current connection target shall be obtained from the newly set target during the call to this method. Changes to that instance after the call to this method shall have no effect on the ConnectionRCInterface unless/until setTarget is called again for that instance or it is released and reserved again.
target
- the new set of connection target parameters
IncompleteTargetException
- if the application owns the resource but the target is not completely specified
PermissionDeniedException
- this exception shall never be thrown
java.lang.SecurityException
- if the application is not allowed to modify the target
as defined by the security policy of the platformpublic void setTargetToDefault() throws PermissionDeniedException
PermissionDeniedException
- if this application does not own the resource
java.lang.SecurityException
- if the application is not allowed to connect to the default targetpublic int getConnectedTime()
public ResourceClient getClient()
getClient
in interface ResourceProxy
public void addConnectionListener(ConnectionListener l)
l
- the listener for the connection related eventspublic void removeConnectionListener(ConnectionListener l)
l
- the listener for the connection related events
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |