|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eodisp.remote.jeri.jxta.JxtaServerEndpoint
public final class JxtaServerEndpoint
An implementation of the ServerEndpoint abstraction that uses JXTA
sockets (instances of JxtaServerSocket) for the
underlying communication mechanism.
Most of the implementation was copied from the the
TcpServerEndpoint class.
All TcpServerEndpoint instances in the same JVM use the same
peer and peer group advertisement. This information is statically received from
JxtaNetwork.
JxtaServerEndpoint uses the Jini(TM) extensible remote invocation
(Jini ERI) multiplexing protocol to map incoming requests to socket
connections.
JxtaEndpoint| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.jini.jeri.ServerEndpoint |
|---|
net.jini.jeri.ServerEndpoint.ListenContext, net.jini.jeri.ServerEndpoint.ListenCookie, net.jini.jeri.ServerEndpoint.ListenEndpoint, net.jini.jeri.ServerEndpoint.ListenHandle |
| Method Summary | |
|---|---|
net.jini.core.constraint.InvocationConstraints |
checkConstraints(net.jini.core.constraint.InvocationConstraints constraints)
|
net.jini.jeri.Endpoint |
enumerateListenEndpoints(net.jini.jeri.ServerEndpoint.ListenContext listenContext)
Passes the ListenEndpoint for this JxtaServerEndpoint to
listenContext, which will ensure an active listen
operation on the endpoint, and returns a JxtaEndpoint
instance corresponding to the listen operation chosen by
listenContext. |
boolean |
equals(java.lang.Object obj)
Compares the specified object with this JxtaServerEndpoint
for equality. |
static JxtaServerEndpoint |
getInstance()
Returns a JxtaServerEndpoint instance. |
int |
hashCode()
Returns the hash code value for this JxtaServerEndpoint. |
java.lang.String |
toString()
Returns a string representation of this JxtaServerEndpoint. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static JxtaServerEndpoint getInstance()
JxtaServerEndpoint instance. All information
about the peer and peer group is obtained statically from the
JxtaNetwork class.
JxtaServerEndpoint instance
public net.jini.core.constraint.InvocationConstraints checkConstraints(net.jini.core.constraint.InvocationConstraints constraints)
throws net.jini.io.UnsupportedConstraintException
checkConstraints in interface net.jini.jeri.ServerCapabilitiesjava.lang.NullPointerException
net.jini.io.UnsupportedConstraintException
public net.jini.jeri.Endpoint enumerateListenEndpoints(net.jini.jeri.ServerEndpoint.ListenContext listenContext)
throws java.io.IOException
ListenEndpoint for this JxtaServerEndpoint to
listenContext, which will ensure an active listen
operation on the endpoint, and returns a JxtaEndpoint
instance corresponding to the listen operation chosen by
listenContext.
This method invokes addListenEndpoint on
listenContext once, passing a ListenEndpoint
as described below. If addListenEndpoint throws an
exception, then this method throws that exception. Otherwise, this method
returns a JxtaEndpoint instance.
The ListenEndpoint passed to
addListenEndpoint behaves as follows:
ListenHandle
listen(RequestDispatcher):
Listens for requests received on this endpoint, dispatching them to the suppliedRequestDispatcherin the form ofInboundRequestinstances.When the implementation of this method needs to create a new
ServerSocket, it will do so by creating a new JxtaServerSocket with the following arguments:JxtaNetwork.getJeriPeerGroup()andJxtaNetwork.getJeriPipeAdvertisement().Requests will be dispatched in a
PrivilegedActionwrapped by aSecurityContextobtained when this method was invoked, with theAccessControlContextof thatSecurityContextin effect.Dispatched requests will implement
populateContextto populate the given collection with an element that implements theClientHostinterface. ThatClientHostelement implementsgetClientHostto return the IP address of theSocketthat the request was received over (seeSocket.getInetAddress()).Throws
IOExceptionif an I/O exception occurs while performing this operation.Throws
NullPointerExceptionifrequestDispatcherisnull
void
checkPermissions():
Does not do any checks at all.
boolean equals(Object):
Compares the specified object with thisListenEndpointfor equality.This method returns
trueif and only if the specified object is also aListenEndpointproduced by aJxtaServerEndpointand is not null.
enumerateListenEndpoints in interface net.jini.jeri.ServerEndpointlistenContext - the ListenContext to pass this
JxtaServerEndpoint's
ListenEndpoint to
JxtaEndpoint instance for sending requests to
this JxtaServerEndpoint's endpoint being listened
on
java.io.IOException - if an I/O exception occurs while performing this operation
java.lang.IllegalArgumentException
java.lang.NullPointerExceptionpublic int hashCode()
JxtaServerEndpoint.
Always returns the same value, because all JxtaServerEndpoints are the
same.
hashCode in class java.lang.ObjectJxtaServerEndpoint.
Always returns 1.public boolean equals(java.lang.Object obj)
JxtaServerEndpoint
for equality.
This method returns true if and only if the specified
object is also a JxtaServerEndpoint and is not null.
equals in class java.lang.Objectobj - the object to compare with
true if obj is equivalent to this
object; false otherwisepublic java.lang.String toString()
JxtaServerEndpoint.
toString in class java.lang.ObjectJxtaServerEndpoint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||