org.restlet
Class Connector

java.lang.Object
  extended by org.restlet.Uniform
      extended by org.restlet.Restlet
          extended by org.restlet.Connector
Direct Known Subclasses:
Client, Server

public abstract class Connector
extends Restlet

Restlet enabling communication between Components. "A connector is an abstract mechanism that mediates communication, coordination, or cooperation among components. Connectors enable communication between components by transferring data elements from one interface to another without changing the data." Roy T. Fielding

"Encapsulate the activities of accessing resources and transferring resource representations. The connectors present an abstract interface for component communication, enhancing simplicity by providing a clean separation of concerns and hiding the underlying implementation of resources and communication mechanisms" Roy T. Fielding

Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.

Author:
Jerome Louvel
See Also:
Source dissertation, Source dissertation

Constructor Summary
Connector(Context context)
          Constructor.
Connector(Context context, java.util.List<Protocol> protocols)
          Constructor.
 
Method Summary
 java.util.List<Protocol> getProtocols()
          Returns the modifiable list of protocols simultaneously supported.
 void setProtocols(java.util.List<Protocol> protocols)
          Sets the protocols simultaneously supported.
 
Methods inherited from class org.restlet.Restlet
getApplication, getContext, getLogger, handle, init, isStarted, isStopped, setContext, start, stop
 
Methods inherited from class org.restlet.Uniform
delete, delete, get, get, handle, head, head, options, options, post, post, put, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connector

public Connector(Context context)
Constructor.

Parameters:
context - The context.

Connector

public Connector(Context context,
                 java.util.List<Protocol> protocols)
Constructor.

Parameters:
context - The context.
protocols - The supported protocols.
Method Detail

getProtocols

public java.util.List<Protocol> getProtocols()
Returns the modifiable list of protocols simultaneously supported.

Returns:
The protocols simultaneously supported.

setProtocols

public void setProtocols(java.util.List<Protocol> protocols)
Sets the protocols simultaneously supported. Method synchronized to make compound action (clear, addAll) atomic, not for visibility.

Parameters:
protocols - The protocols simultaneously supported.


Copyright © 2005-2008 Noelios Technologies.