com.sun.grizzly.filter
Class CustomProtocolServer

java.lang.Object
  extended by com.sun.grizzly.filter.CustomProtocolServer
All Implemented Interfaces:
Server

public abstract class CustomProtocolServer
extends Object
implements Server

Out of the box TCP (TLS optional) Server for using CustomProtocol Comunictaion Layer.

Version:
1.0
Author:
John Vieten 16.09.2008

Constructor Summary
protected CustomProtocolServer(int port)
           
protected CustomProtocolServer(int port, SSLConfig sslConfig)
           
 
Method Summary
 OutputStream getOutputStream(Context ctx)
          If a server wants to write to a specific connection.
 OutputStream getOutputStream(SelectionKey key)
          Can be used to write to a specific connection.
 void start()
          Starts this server.
 void stop()
          Stops this server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.grizzly.filter.Server
service
 

Constructor Detail

CustomProtocolServer

protected CustomProtocolServer(int port)

CustomProtocolServer

protected CustomProtocolServer(int port,
                               SSLConfig sslConfig)
Method Detail

getOutputStream

public OutputStream getOutputStream(SelectionKey key)
Can be used to write to a specific connection.

Specified by:
getOutputStream in interface Server
Parameters:
key - SelectionKey
Returns:
OutputStream

getOutputStream

public OutputStream getOutputStream(Context ctx)
Description copied from interface: Server
If a server wants to write to a specific connection.

Specified by:
getOutputStream in interface Server
Parameters:
ctx - in the momment should be a Context
Returns:
OutputStream for writing to client

start

public void start()
Starts this server.

Specified by:
start in interface Server

stop

public void stop()
Stops this server

Specified by:
stop in interface Server


Copyright © 2013 Oracle Corporation. All Rights Reserved.