org.apache.jackrabbit.mk.server
Class Server

java.lang.Object
  extended by org.apache.jackrabbit.mk.server.Server

public class Server
extends Object

Server exposing a MicroKernel.


Constructor Summary
Server(MicroKernel mk)
          Create a new instance of this class.
Server(MicroKernel mk, ServerSocketFactory ssFactory)
          Create a new instance of this class.
 
Method Summary
 InetSocketAddress getAddress()
          Return the server's local socket address.
 void setBindAddress(InetAddress addr)
          Set bind address.
 void setPort(int port)
          Set port number to listen to.
 void start()
          Start this server.
 void stop()
          Stop this server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server(MicroKernel mk)
Create a new instance of this class.

Parameters:
mk - micro kernel

Server

public Server(MicroKernel mk,
              ServerSocketFactory ssFactory)
Create a new instance of this class.

Parameters:
mk - micro kernel
Method Detail

setPort

public void setPort(int port)
             throws IllegalStateException
Set port number to listen to.

Parameters:
port - port numbern
Throws:
IllegalStateException - if the server is already started

setBindAddress

public void setBindAddress(InetAddress addr)
                    throws IllegalStateException
Set bind address.

Throws:
IllegalStateException

start

public void start()
           throws IOException
Start this server.

Throws:
IOException - if an I/O error occurs

getAddress

public InetSocketAddress getAddress()
Return the server's local socket address.

Returns:
socket address or null if the server is not started

stop

public void stop()
Stop this server.



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.