| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for a transport layer. The transport is loaded and
 destroyed by transport repository. It can be CLIENT
 type and/or SERVER type.
| Field Summary | |
static short | 
CLIENT
Client transport.  | 
static short | 
SERVER
Server transport.  | 
| Method Summary | |
 void | 
destroy()
Destroys the transport.  | 
 Endpoint[] | 
getAbsolutePath(java.lang.String path)
Returns all possible endpoints for local path.  | 
 java.lang.String | 
getLocalPath(URI endpoint)
Returns local path or null. | 
 java.util.Set | 
getMethods()
Get supported methods for connections.  | 
 int | 
getType()
Gets type of the transport.  | 
 boolean | 
isStarted()
If a server is started.  | 
 void | 
load(Configurable config)
Loads the transport.  | 
 ClientConnection | 
newConnection(URI uri,
              TransportMethod method,
              java.util.Map properties)
Factory for new outgoing connections to the given URI.  | 
 ConnectionHandler | 
setHandler(ConnectionHandler handler)
Sets handler for new incoming connections.  | 
 void | 
start(URI endpoint)
Starts listening for new incoming connections on given endpoint.  | 
 void | 
stop()
Stops listening for new incoming connections.  | 
| Field Detail | 
public static final short SERVER
ServerConnections. This
 connections must be passed to ConnectionHandler if
 this one is registered.
public static final short CLIENT
ClientConnections.
| Method Detail | 
public void load(Configurable config)
config - configurable object with transport configpublic void destroy()
public int getType()
SERVER and
         CLIENTpublic java.util.Set getMethods()
TransportMethod.GET,
         TransportMethod.POST,
         TransportMethod.PUT and
         TransportMethod.DELETE
public void start(URI endpoint)
           throws TransportStartException
http://googoo:6060/wasp/ and it's used for
 determining absolute path and local path on the transport or
 null for default configuration.
endpoint - null or endpoint string
TransportStartException - if the transport couldn't be
            startedgetLocalPath(org.idoox.transport.URI), 
getAbsolutePath(java.lang.String)public void stop()
public boolean isStarted()
true if a server is started, otherwise
         falsepublic ConnectionHandler setHandler(ConnectionHandler handler)
ServerConnection is accepted. The
 connection must contain input and output messages if given
 transport method requires these.
handler - the handler
nullpublic java.lang.String getLocalPath(URI endpoint)
null. Returns also
 null if this transport is only client one.
endpoint - the endpoint being tested
TransportRepository.getLocalPath(org.idoox.transport.URI)
public Endpoint[] getAbsolutePath(java.lang.String path)
                           throws java.net.MalformedURLException
null if this transport is only client one.
path - the local path of the endpoint
java.net.MalformedURLExceptionTransportRepository.getAbsolutePath(String)
public ClientConnection newConnection(URI uri,
                                      TransportMethod method,
                                      java.util.Map properties)
                               throws java.io.IOException
uri - URImethod - the method of a transport like
               TransportMethod.GETproperties - properties for the transport or
                   null if they aren't set
java.io.IOException - if an I/O error occurs
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||