|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.integration.spring.Binding
public class Binding
Defines an address to IoHandler
binding.
This is used when specifying the addresses to accept new connections on when
creating IoAcceptor
objects using
IoAcceptorFactoryBean
.
Note that the address
property is of SocketAddress
type. Use InetSocketAddressEditor
or VmPipeAddressEditor
in
your Spring configuration file to simply the creation of
SocketAddress
instances using Spring.
This class also allows for an optional service configuration using
setServiceConfig(IoServiceConfig)
to be specified. If the binding
specifies an IoServiceConfig
IoAcceptorFactoryBean
will
use IoAcceptor.bind(SocketAddress, IoHandler, IoServiceConfig)
instead
of IoAcceptor.bind(SocketAddress, IoHandler)
when binding. The
IoServiceConfig
object lets you specify transport specific
confiuration options and define port specific filters. This makes it possible
to specify different filters depending on the port the client is connecting
on (e.g. using an org.apache.mina.filter.SSLFilter
when connecting
on port 443 but not on port 80).
Constructor Summary | |
---|---|
Binding()
Creates a new empty instance. |
|
Binding(java.net.SocketAddress address,
org.apache.mina.common.IoHandler handler)
Creates a new instance using the specified values. |
|
Binding(java.net.SocketAddress address,
org.apache.mina.common.IoHandler handler,
org.apache.mina.common.IoServiceConfig serviceConfig)
Creates a new instance using the specified values. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
java.net.SocketAddress |
getAddress()
Returns the address the handler of this object will be bound to. |
org.apache.mina.common.IoHandler |
getHandler()
Returns the handler of this binding object. |
org.apache.mina.common.IoServiceConfig |
getServiceConfig()
|
void |
setAddress(java.net.SocketAddress address)
Sets the address the handler of this object will be bound to. |
void |
setHandler(org.apache.mina.common.IoHandler handler)
Sets the handler of this binding object. |
void |
setServiceConfig(org.apache.mina.common.IoServiceConfig serviceConfig)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Binding()
public Binding(java.net.SocketAddress address, org.apache.mina.common.IoHandler handler)
address
- the address.handler
- the handler.
java.lang.IllegalArgumentException
- if the any of the specified values are
null
.public Binding(java.net.SocketAddress address, org.apache.mina.common.IoHandler handler, org.apache.mina.common.IoServiceConfig serviceConfig)
address
- the address.handler
- the handler.serviceConfig
- the service configuration.
java.lang.IllegalArgumentException
- if the any of the specified values are
null
.Method Detail |
---|
public java.net.SocketAddress getAddress()
public void setAddress(java.net.SocketAddress address)
address
- the address.
java.lang.IllegalArgumentException
- if the specified value is
null
.public org.apache.mina.common.IoHandler getHandler()
public void setHandler(org.apache.mina.common.IoHandler handler)
handler
- the handler.
java.lang.IllegalArgumentException
- if the specified value is
null
.public org.apache.mina.common.IoServiceConfig getServiceConfig()
public void setServiceConfig(org.apache.mina.common.IoServiceConfig serviceConfig)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |