|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.HyperCastAppl
The HyperCast Application Object is intended to be a simplified interface to the HyperCast system. Instead of using the Berkeley Sockets paradigm, an object-oriented approach is used. User code simply extends this object to create a HyperCast application.
Field Summary | |
static int |
EXCEPTION_IGNORE
do nothing when exception is caught |
static int |
EXCEPTION_LOG
catch exception and output to log |
static int |
EXCEPTION_LOG_AND_THROW
catch exception and output to log then re-throw exception to user |
static int |
EXCEPTION_THROW
re-throw exception to user |
Fields inherited from interface hypercast.I_OverlaySocket |
HOP_LIMIT_MAXIMUM |
Constructor Summary | |
HyperCastAppl()
Creates a HyperCast application object with defaults for configuration filename and exception actions. |
|
HyperCastAppl(int warningAction,
int fatalAction)
Creates a HyperCast application object with the specified values for exception actions and default configuration filename. |
|
HyperCastAppl(int warningAction,
int fatalAction,
java.lang.String configurationFilename)
Creates a HyperCast application object with the specified values for exception actions and the specified value for the configuration filename. |
|
HyperCastAppl(java.lang.String configurationFilename)
Creates a HyperCast application object with the specified configuration filename and defaults for exception actions. |
Method Summary | |
void |
closeSocket()
Permanently close the socket. |
hypercast.I_LogicalAddress |
createLogicalAddress(byte[] laddr,
int offset)
Creates a logical address from a byte array. |
hypercast.I_LogicalAddress |
createLogicalAddress(java.lang.String laddr)
Creates a logical address object from a String. |
hypercast.I_OverlayMessage |
createMessage(byte[] payload)
Create a message for sending on the overlay socket. |
hypercast.I_OverlayMessage |
createMessage(byte[] payload,
short servicenumber)
Create a message with specified service number. |
hypercast.I_LogicalAddress[] |
getChildren(hypercast.I_LogicalAddress root)
Returns the socket's children's physical/logical address pairs, with respect to the spanning tree rooted at root in the overlay. |
int |
getFatalAction()
|
short |
getHopLimit()
Gets the default hop limit for all future messages created by createMessage . |
hypercast.I_LogicalAddress |
getLogicalAddress()
Returns the address of this socket on the overlay. |
hypercast.I_LogicalAddress[] |
getLogicalAddressByName(java.lang.String name)
|
hypercast.I_LogicalAddress[] |
getLogicalAddressByName(java.lang.String name,
boolean requireTrusted,
long timeout,
boolean requireSerialNumberMatch,
boolean requireAuthoritative,
int maxAge,
int maxResponses,
short minHopCount,
short maxHopCount)
Queries the logical address of the overlay socket having the specified name. |
int |
getLogicalAddressByNameNonBlocking(java.lang.String name)
Same as getLogicalAddress(String) but returns
immediately. |
int |
getLogicalAddressByNameNonBlocking(java.lang.String name,
boolean requireTrusted,
long timeout,
boolean requireSerialNumberMatch,
boolean requireAuthoritative,
int maxAge,
int maxResponses,
short minHopCount,
short maxHopCount)
|
java.lang.String[] |
getNames()
Queries the name of the local overlay socket. |
java.lang.String[] |
getNames(hypercast.I_LogicalAddress peer)
|
java.lang.String[] |
getNames(hypercast.I_LogicalAddress peer,
boolean requireTrusted,
long timeout,
boolean requireSerialNumberMatch,
boolean requireAuthoritative,
int maxAge,
int maxResponses,
short minHopCount,
short maxHopCount)
Queries the name of the overlay socket with logical address peer . |
int |
getNamesNonBlocking(hypercast.I_LogicalAddress peer)
Same as getNames(I_LogicalAddress) but returns
immediately. |
int |
getNamesNonBlocking(hypercast.I_LogicalAddress peer,
boolean requireTrusted,
long timeout,
boolean requireSerialNumberMatch,
boolean requireAuthoritative,
int maxAge,
int maxResponses,
short minHopCount,
short maxHopCount)
|
hypercast.I_LogicalAddress[] |
getNeighbors()
Returns the socket's neighbors' physical/logical address pairs. |
hypercast.I_LogicalAddress |
getParent(hypercast.I_LogicalAddress root)
Returns the addresspair of the next hop for a message routed by this socket towards the root. |
org.w3c.dom.Element[] |
getReadSchema(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
I_Stats#getReadSchema |
int |
getSoTimeout()
Get the timeout for any thread calling receive(). |
org.w3c.dom.Element[] |
getStats(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
I_Stats#getStats |
java.lang.String |
getStatsName()
Gets the element name of this I_Stats instance. |
hypercast.StreamManager |
getStreamManager()
|
byte[] |
getUniqueIdentifier()
Returns a byte array containing a unique identifier of this socket. |
int |
getWarningAction()
|
org.w3c.dom.Element[] |
getWriteSchema(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
I_Stats#getWriteSchema |
void |
handle_E2EACK_RECEIVED(hypercast.events.E2EACK_RECEIVED event)
|
void |
handle_E2EPARTIALACK_RECEIVED(hypercast.events.E2EPARTIALACK_RECEIVED event)
|
void |
handle_NAMING_EVENT(hypercast.events.NAMING_EVENT event)
|
void |
handle_NEWSTREAM_ARRIVED_EVENT(hypercast.events.NEWSTREAM_ARRIVED_EVENT event)
|
void |
handle_NODE_ISSTABLE(hypercast.events.NODE_ISSTABLE event)
|
void |
handle_NODE_LEAVEOVERLAY(hypercast.events.NODE_LEAVEOVERLAY event)
|
void |
handle_NODE_LOGICALADDRESSCHANGED(hypercast.events.NODE_LOGICALADDRESSCHANGED event)
|
void |
handle_NODE_NEIGHBORHOODCHANGED(hypercast.events.NODE_NEIGHBORHOODCHANGED event)
|
void |
installTrustedNamingCertificate(java.security.cert.Certificate certificate)
Installs a trust anchor for use in building chains of trust. |
void |
joinOverlay()
Join the overlay multicast group. |
void |
leaveOverlay()
Leave the overlay multicast group. |
void |
namingLogicalAddressChange()
Signals to the naming service that the logical address of the node has changed. |
hypercast.I_OverlayMessage |
receive()
Receive a message. |
void |
ReceiveCallback(hypercast.I_OverlayMessage message)
Application overrides this method to receive messages. |
void |
sendFlood(hypercast.I_OverlayMessage message)
Sends the message to all nodes using a "flood" routing mechanism. |
void |
sendToAll(hypercast.I_OverlayMessage message)
Sends the message to all members of the overlay topology. |
void |
sendToAllNeighbors(hypercast.I_OverlayMessage message)
Sends the message one hop to all neighbors of this socket in the overlay. |
void |
sendToChildren(hypercast.I_OverlayMessage message,
hypercast.I_LogicalAddress root)
Sends the message one hop to all the children of this socket in the spanning tree rooted at root . |
void |
sendToNode(hypercast.I_OverlayMessage message,
hypercast.I_LogicalAddress destination)
Sends the message unicast over the overlay to the destination. |
void |
sendToParent(hypercast.I_OverlayMessage message,
hypercast.I_LogicalAddress root)
Sends this message one hop to the parent of this socket in the spanning tree rooted at root . |
void |
setFatalAction(int action)
Sets the action taken when a HyperCastFatalRuntimeException occurs. |
void |
setHopLimit(short hopLimit)
Sets the default hop limit for all future messages created by createMessage . |
void |
setLogicalAddress(hypercast.I_LogicalAddress address)
Sets the logical address to specified one. |
void |
setName(java.security.cert.Certificate certificate,
java.security.PrivateKey privateKey)
This method is like setName(String) but the subject common name of the given certificate is used as the name string instead of a Java String object. |
void |
setName(java.security.cert.Certificate certificate,
java.security.PrivateKey privateKey,
java.lang.String name,
hypercast.I_LogicalAddress logicalAddress)
Assigns the specified name to the specified logical address using the specified private key (that matches the public key in the specified certificate) to create a digital signature for the new binding. |
void |
setName(java.lang.String name)
Binds the specified name to the logical address of this overlay socket. |
void |
setName(java.lang.String name,
hypercast.I_LogicalAddress logicalAddress)
Assigns the specified name to the specified logical address. |
void |
setSoTimeout(int timeout)
Set the timeout for any thread calling receive(). |
org.w3c.dom.Element[] |
setStats(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath,
org.w3c.dom.Element newValue)
Sets statistics information for an object which implements this interface. |
void |
setStatsName(java.lang.String name)
Assigns a name to this I_Stats instance. |
void |
setWarningAction(int action)
Sets the action taken when a HyperCastWarningRuntimeException is occurs. |
void |
unsetName(java.security.cert.Certificate certificate,
java.security.PrivateKey privateKey)
This method is like unsetName(String) but uses a certificate instead of a String, it is the inverse of setName(Certificate,PrivateKey). |
void |
unsetName(java.lang.String name)
Unassigns the given name from this overlay socket. |
hypercast.events.E2EACK_RECEIVED |
waitUntil_E2EACK_RECEIVED()
|
hypercast.events.E2EACK_RECEIVED |
waitUntil_E2EACK_RECEIVED(long timeout)
|
hypercast.events.E2EPARTIALACK_RECEIVED |
waitUntil_E2EPARTIALACK_RECEIVED()
|
hypercast.events.E2EPARTIALACK_RECEIVED |
waitUntil_E2EPARTIALACK_RECEIVED(long timeout)
|
hypercast.events.NAMING_EVENT |
waitUntil_NAMING_EVENT()
|
hypercast.events.NAMING_EVENT |
waitUntil_NAMING_EVENT(long timeout)
|
hypercast.events.NEWSTREAM_ARRIVED_EVENT |
waitUntil_NEWSTREAM_ARRIVED_EVENT()
|
hypercast.events.NEWSTREAM_ARRIVED_EVENT |
waitUntil_NEWSTREAM_ARRIVED_EVENT(long timeout)
|
hypercast.events.NODE_ISSTABLE |
waitUntil_NODE_ISSTABLE()
|
hypercast.events.NODE_ISSTABLE |
waitUntil_NODE_ISSTABLE(long timeout)
|
hypercast.events.NODE_LEAVEOVERLAY |
waitUntil_NODE_LEAVEOVERLAY()
|
hypercast.events.NODE_LEAVEOVERLAY |
waitUntil_NODE_LEAVEOVERLAY(long timeout)
|
hypercast.events.NODE_LOGICALADDRESSCHANGED |
waitUntil_NODE_LOGICALADDRESSCHANGED()
|
hypercast.events.NODE_LOGICALADDRESSCHANGED |
waitUntil_NODE_LOGICALADDRESSCHANGED(long timeout)
|
hypercast.events.NODE_NEIGHBORHOODCHANGED |
waitUntil_NODE_NEIGHBORHOODCHANGED()
|
hypercast.events.NODE_NEIGHBORHOODCHANGED |
waitUntil_NODE_NEIGHBORHOODCHANGED(long timeout)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int EXCEPTION_LOG
public static final int EXCEPTION_THROW
public static final int EXCEPTION_LOG_AND_THROW
public static final int EXCEPTION_IGNORE
Constructor Detail |
public HyperCastAppl()
public HyperCastAppl(java.lang.String configurationFilename)
public HyperCastAppl(int warningAction, int fatalAction)
public HyperCastAppl(int warningAction, int fatalAction, java.lang.String configurationFilename)
Method Detail |
public hypercast.events.NODE_ISSTABLE waitUntil_NODE_ISSTABLE()
public hypercast.events.E2EACK_RECEIVED waitUntil_E2EACK_RECEIVED()
public hypercast.events.E2EPARTIALACK_RECEIVED waitUntil_E2EPARTIALACK_RECEIVED()
public hypercast.events.NEWSTREAM_ARRIVED_EVENT waitUntil_NEWSTREAM_ARRIVED_EVENT()
public hypercast.events.NODE_LEAVEOVERLAY waitUntil_NODE_LEAVEOVERLAY()
public hypercast.events.NODE_LOGICALADDRESSCHANGED waitUntil_NODE_LOGICALADDRESSCHANGED()
public hypercast.events.NODE_NEIGHBORHOODCHANGED waitUntil_NODE_NEIGHBORHOODCHANGED()
public hypercast.events.NAMING_EVENT waitUntil_NAMING_EVENT()
public hypercast.events.NODE_ISSTABLE waitUntil_NODE_ISSTABLE(long timeout)
public hypercast.events.E2EACK_RECEIVED waitUntil_E2EACK_RECEIVED(long timeout)
public hypercast.events.E2EPARTIALACK_RECEIVED waitUntil_E2EPARTIALACK_RECEIVED(long timeout)
public hypercast.events.NEWSTREAM_ARRIVED_EVENT waitUntil_NEWSTREAM_ARRIVED_EVENT(long timeout)
public hypercast.events.NODE_LEAVEOVERLAY waitUntil_NODE_LEAVEOVERLAY(long timeout)
public hypercast.events.NODE_LOGICALADDRESSCHANGED waitUntil_NODE_LOGICALADDRESSCHANGED(long timeout)
public hypercast.events.NODE_NEIGHBORHOODCHANGED waitUntil_NODE_NEIGHBORHOODCHANGED(long timeout)
public hypercast.events.NAMING_EVENT waitUntil_NAMING_EVENT(long timeout)
public void handle_NODE_NEIGHBORHOODCHANGED(hypercast.events.NODE_NEIGHBORHOODCHANGED event)
public void handle_NODE_LOGICALADDRESSCHANGED(hypercast.events.NODE_LOGICALADDRESSCHANGED event)
public void handle_NODE_LEAVEOVERLAY(hypercast.events.NODE_LEAVEOVERLAY event)
public void handle_NEWSTREAM_ARRIVED_EVENT(hypercast.events.NEWSTREAM_ARRIVED_EVENT event)
public void handle_E2EPARTIALACK_RECEIVED(hypercast.events.E2EPARTIALACK_RECEIVED event)
public void handle_E2EACK_RECEIVED(hypercast.events.E2EACK_RECEIVED event)
public void handle_NODE_ISSTABLE(hypercast.events.NODE_ISSTABLE event)
public void handle_NAMING_EVENT(hypercast.events.NAMING_EVENT event)
public void ReceiveCallback(hypercast.I_OverlayMessage message)
ReceiveCallback
in interface I_ReceiveCallback
public final void joinOverlay()
I_OverlaySocket
joinOverlay
in interface I_OverlaySocket
public final void leaveOverlay()
I_OverlaySocket
leaveOverlay
in interface I_OverlaySocket
public final void closeSocket()
I_OverlaySocket
closeSocket
in interface I_OverlaySocket
public final void namingLogicalAddressChange()
I_OverlaySocket
namingLogicalAddressChange
in interface I_OverlaySocket
public final hypercast.I_OverlayMessage createMessage(byte[] payload)
I_OverlaySocket
createMessage
in interface I_OverlaySocket
OL_Socket.createMessage(byte[] payload)
public final hypercast.I_OverlayMessage createMessage(byte[] payload, short servicenumber)
I_OverlaySocket
createMessage
in interface I_OverlaySocket
OL_Socket.createMessage(byte[] payload, short servicenumber)
public final void sendToNode(hypercast.I_OverlayMessage message, hypercast.I_LogicalAddress destination)
I_OverlaySocket
sendToNode
in interface I_OverlaySocket
OL_Socket.sendToNode(I_OverlayMessage message, I_LogicalAddress destination)
public final void sendToParent(hypercast.I_OverlayMessage message, hypercast.I_LogicalAddress root)
I_OverlaySocket
root
.
sendToParent
in interface I_OverlaySocket
OL_Socket.sendToParent(I_OverlayMessage message, I_LogicalAddress root)
public final void sendToChildren(hypercast.I_OverlayMessage message, hypercast.I_LogicalAddress root)
I_OverlaySocket
root
. Also
see getChildren
.
sendToChildren
in interface I_OverlaySocket
OL_Socket.sendToChildren(I_OverlayMessage message, I_LogicalAddress root)
public final void sendToAllNeighbors(hypercast.I_OverlayMessage message)
I_OverlaySocket
sendToAllNeighbors
in interface I_OverlaySocket
OL_Socket.sendToAllNeighbors(I_OverlayMessage message)
public final void sendToAll(hypercast.I_OverlayMessage message)
I_OverlaySocket
sendToAll
in interface I_OverlaySocket
OL_Socket.sendToAll(I_OverlayMessage message)
public final void sendFlood(hypercast.I_OverlayMessage message)
I_OverlaySocket
sendFlood
in interface I_OverlaySocket
OL_Socket.sendFlood(I_OverlayMessage message)
public final hypercast.I_LogicalAddress createLogicalAddress(byte[] laddr, int offset)
I_OverlaySocket
createLogicalAddress
in interface I_OverlaySocket
OL_Socket.createLogicalAddress(byte[] laddr, int offset)
public final hypercast.I_LogicalAddress createLogicalAddress(java.lang.String laddr)
I_OverlaySocket
createLogicalAddress
in interface I_OverlaySocket
OL_Socket.createLogicalAddress(String laddr)
public final hypercast.I_LogicalAddress getLogicalAddress()
I_OverlaySocket
getLogicalAddress
in interface I_OverlaySocket
OL_Socket.getLogicalAddress()
public final void setLogicalAddress(hypercast.I_LogicalAddress address)
I_OverlaySocket
setLogicalAddress
in interface I_OverlaySocket
OL_Socket.setLogicalAddress(I_LogicalAddress address)
public final byte[] getUniqueIdentifier()
I_OverlaySocket
getUniqueIdentifier
in interface I_OverlaySocket
OL_Socket.getUniqueIdentifier()
public void setName(java.lang.String name)
I_OverlaySocket
Binds the specified name to the logical address of this overlay socket. This operation might cause the new binding to be "pushed" to other peers in the network, depending upon the policy configuration of the socket. The global uniqueness of the names of overlay sockets is neither enforced nor required. The set of all bindings with a particular name defines a group.
setName
in interface I_OverlaySocket
name
- The string that will be set as the name of this overlay socket.OL_Socket.setName(String)
public void setName(java.security.cert.Certificate certificate, java.security.PrivateKey privateKey)
I_OverlaySocket
This method is like setName(String) but the subject common name of the given certificate is used as the name string instead of a Java String object. Also, a private key, cooresponding to the public key in the certificate, is given so that naming message that are sent to peers can be cryptographically signed.
setName
in interface I_OverlaySocket
OL_Socket.setName(Certificate,PrivateKey)
public void setName(java.lang.String name, hypercast.I_LogicalAddress logicalAddress)
I_OverlaySocket
Assigns the specified name to the specified logical address. The logical address can be any address in the current logical address space. This operation allows bindings to be created for the logical addresses of sockets other than the local socket.
setName
in interface I_OverlaySocket
name
- The string that will be used as the name of a new binding.logicalAddress
- The logical address that will be used as the logical address of a new binding.OL_Socket.setName(String,I_LogicalAddress)
public void setName(java.security.cert.Certificate certificate, java.security.PrivateKey privateKey, java.lang.String name, hypercast.I_LogicalAddress logicalAddress)
I_OverlaySocket
Assigns the specified name to the specified logical address using the specified private key (that matches the public key in the specified certificate) to create a digital signature for the new binding. The subject common name of the specified certificate is used as the signer name of the binding. The logical address can be any address in the current logical address space. This operation allows bindings to be created for the logical addresses of sockets other than the local socket.
setName
in interface I_OverlaySocket
name
- The string that will be used as the name of a new binding.logicalAddress
- The logical address that will be used as the logical address of a new binding.certificate
- Certificate that contains the name that will be the signer of the new binding.privateKey
- Key used to create a digital signature for a new bindingOL_Socket.setName(Certificate,PrivateKey,String,I_LogicalAddress)
public void unsetName(java.lang.String name)
I_OverlaySocket
Unassigns the given name from this overlay socket. This operation might cause an invalidation operation for the name to be "pushed" to other nodes in the network, depending upon the policy configuration of the socket.
unsetName
in interface I_OverlaySocket
name
- The string that will be unset as the name of this overlay socket.OL_Socket.unsetName(String)
public void unsetName(java.security.cert.Certificate certificate, java.security.PrivateKey privateKey)
I_OverlaySocket
This method is like unsetName(String) but uses a certificate instead of a String, it is the inverse of setName(Certificate,PrivateKey).
unsetName
in interface I_OverlaySocket
OL_Socket.unsetName(Certificate, PrivateKey)
public java.lang.String[] getNames()
I_OverlaySocket
Queries the name of the local overlay socket.
getNames
in interface I_OverlaySocket
OL_Socket.getNames()
public java.lang.String[] getNames(hypercast.I_LogicalAddress peer)
getNames
in interface I_OverlaySocket
peer
- The logical address of the node for which a name is requested.OL_Socket.getNames(I_LogicalAddress)
public java.lang.String[] getNames(hypercast.I_LogicalAddress peer, boolean requireTrusted, long timeout, boolean requireSerialNumberMatch, boolean requireAuthoritative, int maxAge, int maxResponses, short minHopCount, short maxHopCount)
I_OverlaySocket
peer
. The name returned can be the name of the
local socket, if the logical address is the logical address of
the local socket. This implements a "reverse lookup" function
for name resolution. If the value returned is a zero length
array it does not imply that no such logical address exists on
the network, only that the request could not be satisfied,
i.e. this call does not guarentee that it will find a name if
one exists for a given logical address.
getNames
in interface I_OverlaySocket
peer
- The logical address of the node for which a name is requested.requireTrusted
- If true only trusted bindings will be acceptedtimeout
- Time in milliseconds before this query will be ended. Can be Naming.WAIT_INDEFINITELY.requireSerialNumberMatch
- Each query has a unique serial number assigned to it. If this parameter is true then
the serial number of a valid response must match the serial number of a query.requireAuthoritative
- If true only bindings received from the authoritative peer will be acceptedmaxAge
- The maximum age in milliseconds of an acceptable
query. Calculated from the time of the query for already cached
bindings; calculated from time of receipt for bindings received
after the query is made.maxResponses
- The query will end when this number of responses are received. Can be Naming.NO_RESPONSE_LIMIT.minHopCount
- The minimum number of hops that a query must make before it is not propagated further.maxHopCount
- The maximum number of hops that a query can make before it is not propagated further.
OL_Socket.getNames(I_LogicalAddress, boolean, long, boolean, boolean, int, int, short, short)
public int getNamesNonBlocking(hypercast.I_LogicalAddress peer)
I_OverlaySocket
Same as getNames(I_LogicalAddress)
but returns
immediately. Application must handle related
NAMING_EVENT
notifications containing responses to
this call.
getNamesNonBlocking
in interface I_OverlaySocket
OL_Socket.getNamesNonBlocking(I_LogicalAddress)
public int getNamesNonBlocking(hypercast.I_LogicalAddress peer, boolean requireTrusted, long timeout, boolean requireSerialNumberMatch, boolean requireAuthoritative, int maxAge, int maxResponses, short minHopCount, short maxHopCount)
getNamesNonBlocking
in interface I_OverlaySocket
peer
- The logical address of the node for which a name is requested.requireTrusted
- If true only trusted bindings will be acceptedtimeout
- Time in milliseconds before this query will be ended. Can be Naming.WAIT_INDEFINITELY.requireSerialNumberMatch
- Each query has a unique serial number assigned to it. If this parameter is true then
the serial number of a valid response must match the serial number of a query.requireAuthoritative
- If true only bindings received from the authoritative peer will be acceptedmaxAge
- The maximum age in milliseconds of an acceptable
query. Calculated from the time of the query for already cached
bindings; calculated from time of receipt for bindings received
after the query is made.maxResponses
- The query will end when this number of responses are received. Can be Naming.NO_RESPONSE_LIMIT.minHopCount
- The minimum number of hops that a query must make before it is not propagated further.maxHopCount
- The maximum number of hops that a query can make before it is not propagated further.
OL_Socket.getNamesNonBlocking(I_LogicalAddress, boolean, long, boolean, boolean, int, int, short, short)
public hypercast.I_LogicalAddress[] getLogicalAddressByName(java.lang.String name)
getLogicalAddressByName
in interface I_OverlaySocket
name
- The name of a socket for which the logical address is requested.OL_Socket.getLogicalAddressByName(String)
public hypercast.I_LogicalAddress[] getLogicalAddressByName(java.lang.String name, boolean requireTrusted, long timeout, boolean requireSerialNumberMatch, boolean requireAuthoritative, int maxAge, int maxResponses, short minHopCount, short maxHopCount)
I_OverlaySocket
Queries the logical address of the overlay socket having the specified name. If no such socket can be found, a zero length array is returned. A result of a zero length array does not imply that no such socket exists, only that one could not be found, i.e. this call does not guarentee that it will find a logical address if one exists for a given name.
getLogicalAddressByName
in interface I_OverlaySocket
name
- The name for which a logical address lookup is being performedrequireTrusted
- If true only trusted bindings will be acceptedtimeout
- Time in milliseconds before this query will be ended. Can be Naming.WAIT_INDEFINITELY.requireSerialNumberMatch
- Each query has a unique serial number assigned to it. If this parameter is true then
the serial number of a valid response must match the serial number of a query.requireAuthoritative
- If true only bindings received from the authoritative peer will be acceptedmaxAge
- The maximum age in milliseconds of an acceptable
query. Calculated from the time of the query for already cached
bindings; calculated from time of receipt for bindings received
after the query is made.maxResponses
- The query will end when this number of responses are received. Can be Naming.NO_RESPONSE_LIMIT.minHopCount
- The minimum number of hops that a query must make before it is not propagated further.maxHopCount
- The maximum number of hops that a query can make before it is not propagated further.
OL_Socket.getLogicalAddressByName(String, boolean, long, boolean, boolean, int, int, short, short)
public int getLogicalAddressByNameNonBlocking(java.lang.String name)
I_OverlaySocket
Same as getLogicalAddress(String)
but returns
immediately. Application must handle related
NAMING_EVENT
notifications containing responses to
this call.
getLogicalAddressByNameNonBlocking
in interface I_OverlaySocket
OL_Socket.getLogicalAddressByNameNonBlocking(String)
public int getLogicalAddressByNameNonBlocking(java.lang.String name, boolean requireTrusted, long timeout, boolean requireSerialNumberMatch, boolean requireAuthoritative, int maxAge, int maxResponses, short minHopCount, short maxHopCount)
getLogicalAddressByNameNonBlocking
in interface I_OverlaySocket
name
- The name for which a logical address lookup is being performedrequireTrusted
- If true only trusted bindings will be acceptedtimeout
- Time in milliseconds before this query will be ended. Can be Naming.WAIT_INDEFINITELY.requireSerialNumberMatch
- Each query has a unique serial number assigned to it. If this parameter is true then
the serial number of a valid response must match the serial number of a query.requireAuthoritative
- If true only bindings received from the authoritative peer will be acceptedmaxAge
- The maximum age in milliseconds of an acceptable
query. Calculated from the time of the query for already cached
bindings; calculated from time of receipt for bindings received
after the query is made.maxResponses
- The query will end when this number of responses are received. Can be Naming.NO_RESPONSE_LIMIT.minHopCount
- The minimum number of hops that a query must make before it is not propagated further.maxHopCount
- The maximum number of hops that a query can make before it is not propagated further.
OL_Socket.getLogicalAddressByNameNonBlocking(String, boolean, long, boolean, boolean, int, int, short, short)
public void installTrustedNamingCertificate(java.security.cert.Certificate certificate)
I_OverlaySocket
installTrustedNamingCertificate
in interface I_OverlaySocket
OL_Socket.installTrustedNamingCertificate(Certificate)
public final hypercast.I_LogicalAddress getParent(hypercast.I_LogicalAddress root)
I_OverlaySocket
root
.
getParent
in interface I_OverlaySocket
OL_Socket.getParent(I_LogicalAddress root)
public final hypercast.I_LogicalAddress[] getChildren(hypercast.I_LogicalAddress root)
I_OverlaySocket
root
in the overlay.
getChildren
in interface I_OverlaySocket
OL_Socket.getChildren(I_LogicalAddress root)
public final hypercast.I_LogicalAddress[] getNeighbors()
I_OverlaySocket
getNeighbors
in interface I_OverlaySocket
OL_Socket.getNeighbors()
public final void setHopLimit(short hopLimit)
I_OverlaySocket
createMessage
. It can be overriden on a
per-message basis by I_OverlayMessage.setHopLimit
.
setHopLimit
in interface I_OverlaySocket
for an explanation of the interpretation of the field value.
public final short getHopLimit()
I_OverlaySocket
createMessage
.
getHopLimit
in interface I_OverlaySocket
OL_Socket.getHopLimit()
public final void setSoTimeout(int timeout)
I_OverlaySocket
setSoTimeout
in interface I_OverlaySocket
OL_Socket.setSoTimeout(int timeout)
public final int getSoTimeout()
I_OverlaySocket
getSoTimeout
in interface I_OverlaySocket
OL_Socket.getSoTimeout()
public final hypercast.StreamManager getStreamManager()
getStreamManager
in interface I_OverlaySocket
OL_Socket.getStreamManager()
public final void setWarningAction(int action)
EXCEPTION_LOG
,
EXCEPTION_LOG_AND_THROW
,
EXCEPTION_THROW
,
EXCEPTION_IGNORE
public final int getWarningAction()
setWarningAction(int action)
public final void setFatalAction(int action)
EXCEPTION_LOG
,
EXCEPTION_LOG_AND_THROW
,
EXCEPTION_THROW
,
EXCEPTION_IGNORE
public final int getFatalAction()
setFatalAction(int action)
public final hypercast.I_OverlayMessage receive()
I_OverlaySocket
config.createSocket(null)
).
The thread doing this call can be interrupted.
receive
in interface I_OverlaySocket
public org.w3c.dom.Element[] getStats(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getStats
in interface I_Stats
xpath
- Specifies the statistic subtree to query.doc
- The document is used as a factory to create XML
objects such as Nodes and Elements as needed. TODO: describe
how the XML document in the doc is used.
HyperCastStatsException
- If the xpath does not specify a valid subtree.public org.w3c.dom.Element[] setStats(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath, org.w3c.dom.Element newValue) throws HyperCastStatsException
I_Stats
setStats
in interface I_Stats
xpath
- Specifies the statistic subtree to use when updating values.doc
- The document is used as a factory to create XML
objects such as Nodes and Elements as needed. TODO: describe
how the XML document in the doc is used.
HyperCastStatsException
- If the xpath does not specify a
valid subtree or if any part of the the subtree is read-only,
or if the newValue
does not conform with the
expected format.I_Stats.setStats(org.w3c.dom.Document, org.apache.xpath.XPath, org.w3c.dom.Element)
public org.w3c.dom.Element[] getReadSchema(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getReadSchema
in interface I_Stats
HyperCastStatsException
- If some part of the specified
subtree does not correctly implement this interface method.public org.w3c.dom.Element[] getWriteSchema(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getWriteSchema
in interface I_Stats
HyperCastStatsException
- If some part of the specified
subtree does not correctly implement this interface method.public java.lang.String getStatsName()
I_Stats
getStatsName
in interface I_Stats
I_Stats.getStatsName()
public void setStatsName(java.lang.String name)
I_Stats
setStatsName
in interface I_Stats
name
- the name assigned to the I_Stats instance.I_Stats.setStatsName(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |