Package org.restlet
Class Connector
java.lang.Object
org.restlet.Restlet
org.restlet.Connector
- All Implemented Interfaces:
Uniform
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.
"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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the modifiable list of protocols simultaneously supported.abstract booleanIndicates the underlying connector helper is available.voidsetProtocols(List<Protocol> protocols) Sets the list of protocols simultaneously supported.Methods inherited from class org.restlet.Restlet
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner, start, stop
-
Constructor Details
-
Connector
Constructor.- Parameters:
context- The context.
-
Connector
Constructor.- Parameters:
context- The context.protocols- The supported protocols.
-
-
Method Details
-
getProtocols
Returns the modifiable list of protocols simultaneously supported.- Returns:
- The protocols simultaneously supported.
-
isAvailable
public abstract boolean isAvailable()Indicates the underlying connector helper is available.- Returns:
- True if the underlying connector helper is available.
-
setProtocols
Sets the list of protocols simultaneously supported. This method clears the current list and adds all entries in the parameter list.- Parameters:
protocols- A list of protocols.
-